Bash script blcheck from github format issues with emailing output
Console output displays correct, but when sent to email via mailx will on go as attachment, not to body.
33%% dnsbl.inps.de ✓
50%% xbl.spamhaus.org ✓
Output to file or email example:
16%% dnsbl-3.uceprotect.net ^MESC(BESC[m 16%% dnsbl-.uceprotect.net ✓ESC(BESC[m
Advise pls on how can I correct the format in file & email ?
CMD that's not sending to eamil body:
sh blcheck -v xx.xx.xx.xx | mail -s "server-blcheckdate
After assistance of @john1024 & @cas & previous post Removing Control Chars below cmd resolved issue.
CMD: ./blcheck-l -v xx.xx.xx.xx | perl -pe 's/\e([^]|[.*?[a-zA-Z]|].*?\a)//g' | col -b | mail -s "blcheck-l -v `date`" email@address
darko-poljak has submitted a pull request on github with a new option to make output friendly for non interactive use.