Malfunction in bash script
From: Adrian (adrianne54_at_poczta.onet.pl)
Date: 01/29/04
- Next message: Icarus Sparry: "Re: for loop (?)"
- Previous message: Jukka Salmi: "how to output a control char with /bin/sh?"
- Next in thread: Icarus Sparry: "Re: Malfunction in bash script"
- Reply: Icarus Sparry: "Re: Malfunction in bash script"
- Reply: Michael Tosch: "Re: Malfunction in bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jan 2004 15:58:58 +0100
Hello!
I've written script which should tar all files specified in command
line, then split it, uuencode every part (all that WORKS) and than
should part by part send all of them in separate e-mails waiting
specified time before sending each e-mail.
Program seems to work, it echos text for each file which he should send
(I've added it for debug purposes) but I don't receive all of the parts
(normally only half of them). I've set delay to 240 - still doesn't work
as it should. My mail-program checks account every 2 minutes.
Below I include section responsible for sending e-mails. $autoryzacja is
set by default to "", it could include auth plain or auth login text.
If someone please could write what's wrong I would be extremally
grateful. It's my first so long script and now I cannot even concentrate
on it.
Adrian
counter=1
ls_parts=`ls $project_dir"/parts_encoded"`
for split_part in $ls_parts
do
touch $temp_mail
echo -e -n "EHLO $server\n$autoryzacja\nmail from: <$sender>\nrcpt to:
<$receiver>\nDATA\nFrom: <$sender>\nTo:
<$receiver>\nReply-to:<$sender>\nX-mailer: split_sender\nXsend-content:
encoded_part\nXsend-project_name: $project_name\nSubject: $project_name
part $split_part by split_sender\n" > $temp_mail
cat $project_dir"/parts_encoded/"$split_part >> $temp_mail
echo -e -n "\n.\nQUIT\n" >> $temp_mail
echo "Sending part $counter ( "$project_name" ["$split_part"] )"
cat $temp_mail | nc $server 25 > /dev/zero
rm -f $temp_mail
counter=$(($counter+1))
echo "Sleep for $delay seconds"
sleep $delay
done
- Next message: Icarus Sparry: "Re: for loop (?)"
- Previous message: Jukka Salmi: "how to output a control char with /bin/sh?"
- Next in thread: Icarus Sparry: "Re: Malfunction in bash script"
- Reply: Icarus Sparry: "Re: Malfunction in bash script"
- Reply: Michael Tosch: "Re: Malfunction in bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|