New answers tagged

0

according to the Bash-scripting guide. Process ID (PID) of the script itself. The $$ variable often finds use in scripts to construct "unique" temp file names. if you run echo $$ in a script you see the output is different from PID of current shell.


0

#!/bin/bash m() { to_addr="$1" cc_addr="$2" subject="$3" body="$4" cat "$body" | mail -s "$subject" -c "$cc_addr" "$to_addr" } if [[ "$#" -eq 4 ]]; then m "$1" "$2" "$3" "$4" else echo "Incorrect number of paramaters. Aborting." echo "Example syntax: $0 recipient@example.com ccrecipient@example.com "Message Subject" /path/...



Top 50 recent answers are included