Bash Scripting Question
Hi below is a script I made. I need to send an email automatically from within this script.
Now at the moment when it is run, mail asks for a subject then Ctrl to send, is there a way this can be done within the script. Jeremy. #!/bin/sh if [ $# -ne 1 ] then echo "You Must Use The Correct Syntax" echo "Syntax: test.sh username" else name=$1 if who | grep "$name" then mail -s "$name has logged on" simmondj@basil.it.net echo "email sent" else echo "$name is not logged on" fi fi |
Re: Bash Scripting Question
Quote:
Just a wild guess. Don't know if this is going to make any difference. |
I don't think that will help my problem.
What difference will thoes alterations make??? |
All times are GMT -5. The time now is 06:21 AM. |