Need help with formatting. Formatting is messed up when I receive it on my smartphone. I prefer NOT to receive the email as an attachment.
Here's my code. I've tried to use cat and the sed commands. Doesn't appears to have any affect once it comes into my mail client.
netstat -an | grep LISTEN | grep -v '2525'|grep -v '8883'|grep -v '3338'|grep -v '631' | sed 'G'` | mail -s "$SUBJECT" "$MAILTO"
or
`cat ~/ports.txt` //cat seems to remove the newline when I pipe it to mail
Both code above shows the output as the 'current output' below
Current output on smartphone mail client is
tcp46 0 0 *5204 *.* LISTEN tcp47 0 0 *5204 *.* LISTEN
Wanted output is
tcp46 0 0 *5204 *.* LISTEN
tcp47 0 0 *5204 *.* LISTEN
Here's my code. I've tried to use cat and the sed commands. Doesn't appears to have any affect once it comes into my mail client.
netstat -an | grep LISTEN | grep -v '2525'|grep -v '8883'|grep -v '3338'|grep -v '631' | sed 'G'` | mail -s "$SUBJECT" "$MAILTO"
or
`cat ~/ports.txt` //cat seems to remove the newline when I pipe it to mail
Both code above shows the output as the 'current output' below
Current output on smartphone mail client is
tcp46 0 0 *5204 *.* LISTEN tcp47 0 0 *5204 *.* LISTEN
Wanted output is
tcp46 0 0 *5204 *.* LISTEN
tcp47 0 0 *5204 *.* LISTEN