Re: Malfunction in bash script
From: Adrian (adrianne54_at_poczta.onet.pl)
Date: 01/29/04
- Next message: Adrian: "Re: Malfunction in bash script"
- Previous message: nospam55: "Re: bash: how to restore output to the term after exec>FILE?"
- In reply to: Icarus Sparry: "Re: Malfunction in bash script"
- Next in thread: Bruce Barnett: "Re: Malfunction in bash script"
- Reply: Bruce Barnett: "Re: Malfunction in bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jan 2004 19:50:29 +0100
>
> Is there a good reason why you don't use a normal mail agent?
>
Yes. I need to wait before sending each message. Receiver can have a
slower bandwitch.
> Have you tried writing it as
>
> {
> echo "EHLO $server"
> sleep 3
> echo $autoryzacja
> sleep 3
> echo "mail from: $sender"
> sleep 3
> ....
> cat file
> echo -e '\r\n.\r'
> sleep 3
> echo "QUIT"
> sleep 20
> } | nc $server 25
>
I had problems with {}| syntax. Writing just as you said in demo script
seems to work OK so I'll rewrite my script.
I thought nc by default wait for server's response before sending next
line. Maybe I was wrong. I haven't written its source code. I'm only
beginner :-)
Thanks
Adrian
- Next message: Adrian: "Re: Malfunction in bash script"
- Previous message: nospam55: "Re: bash: how to restore output to the term after exec>FILE?"
- In reply to: Icarus Sparry: "Re: Malfunction in bash script"
- Next in thread: Bruce Barnett: "Re: Malfunction in bash script"
- Reply: Bruce Barnett: "Re: Malfunction in bash script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]