need a small help to send an email to 2 email addresses on finish script.
#!/bin/bash
DATA="date +%e-%m-%y"
SUBJET="Script executed $data"
EMAIL="email@email.com,email2@mail.com"
/usr/bin/php home/user/public_html/script1.php
sleep 60
/usr/bin/php home/user/public_html/script2.php
echo "data" | mail -s "$subjet" "$email"
Any help is appreciated.
the email addresses should be separated by whitespace, rather than comma.
also note, that bash variables are case-sensitive ($data != $DATA)
something like:
UPDATE
put the
dateinto $(), so they get evaluated by bash