Answer the question
In order to leave comments, you need to log in
Bash script - how to split data?
Hello!
Help with script.
#! /bin/bash
to=$1
subject=$2
body=$3
ack=`echo "select message FROM table WHERE id='$body'" | mysql -uuser -ppassword -Dbase`
cat <<EOF | mail -s "$subject" "$to"
$ack
EOF
"When the notification script is executed, it is passed to it via command line 3 ($1, $2 and $3 respectively): To Subject Message"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question