I have developed a script in linux bash that is running in background and send emails when something related is found. Here is mail code of that script.
mail -s "Backup File place XYZ.... " "$EMAIL"
There is no body of that email as everything is covered in subject. but problem is that whenever it sends an email i get ouptput on console saying
" Null message body; hope that's ok"....
Now I want dont want this text. how can i stop it.
You could always just route the output to the bit bucket:
This, of course, assumes you don't care if you actually see errors there.
From Bash Version 4 onwards
should redirect stdout and stderr to /dev/null