How to insert a delay between pipelining commands in a bash script. E.g. cat file | telnet mail.domain.com 25 How to insert a delay between pipelining commands in a bash script. E.g. cat file | telnet mail.domain.com 25 linux linux

How to insert a delay between pipelining commands in a bash script. E.g. cat file | telnet mail.domain.com 25


You could try something like:

(echo -n; sleep 5; cat tempfile) | mail.domain.com 25

to open the connection and write nothing, wait for 5 seconds and write the rest.