January 13th, 2010, 01:34 AM
Consider this pseudo-code:
What I want to do is run >=2 commands in series for a single stream to mailx. I already tried to
cat `syslogreporter` `df -h` | mailx -s "Periodic Report" hotaru
but then I lose newlines.
I know I can accomplish this with Python, but can I do it in bash alone?
January 13th, 2010, 05:24 AM
You are taking the outputs of two commands and wanting to pass them forward - don't use cat for that!
echo "`syslogreporter` `df -h`" | mailx -s "Periodic Report" hotaru
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
January 3rd, 2014, 08:24 AM
(syslogreporter && df -h) | mailx -s "Periodic Report" hotaru