I have a system (rhel5) that does not support mailx
's -E
option (for not sending email if the body is empty). Is there a one liner that i could use to simulate this feature? eg the first would send, but the second wouldn't
echo 'hello there' | blah | mailx -s 'test email' me@you.com
echo '' | blah | mailx -s 'test email' me@you.com