4

Shell script hangs on mail command

view full story
linux-howto

http://unix.stackexchange.com – I'm finding that a call to the mail command is causing a script to suspend without error. To close the script I have to ctrl-c or issue a kill command on the process id. The pertinent section of the script is below: EMAIL_TO="[email protected]" if [ -f /www/archives/pdf/pdf_201207021048.tar ]; then echo "file exists" else echo "file does not exist" fi echo "sending mail next..." mail -s "pdfbackup" "$EMAIL_TO" echo "mail sent?" When running this, I'm seeing the text "sending mail next..." and nothing more. It never returns to prompt. I can see the script is still in memory w (HowTos)