I wish to use an echo command into my bash script.
Actually I do that way =>
echo --- REPORT ---
echo - Report send @ $(date +%d-%m-%y_%H:%M)
echo "echo \"Subject: BACKUP-$serv\"" | cat $cheminlogs/backup-$serv.log | /opt/zimbra/postfix/sbin/sendmail -r $mail1 $mail2;
echo - Report done @ $(date +%d-%m-%y_%H:%M)
But that's don't work when I call my sh file, that's print the echo linke but won't send me the email into the 3rd line command
If I use my command alone that's ok
echo "Subject: BACKUP-$serv" | cat $cheminlogs/backup-$serv.log | /opt/zimbra/postfix/sbin/sendmail -r $mail1 $mail2;
I don't know how to use the echo in the start of a new command
Perhaps I can change my email command by invertion argument but that's send me an email without textarea cat
cat $cheminlogs/backup-$serv.log | echo "Subject: BACKUP-$serv" | /opt/zimbra/postfix/sbin/sendmail -r $mail1 $mail2;