I'm using the logger
command and process substitution for logging my script output to Syslog.
exec > >(logger --id="$$" -p 'local0.info') 2> >(logger --id="$$" -p 'local0.err')
However, that sometimes includes blank lines, like the second line in the example below:
Jun 25 09:27:07 foo bar[13219]: something
Jun 25 09:27:07 foo bar[13219]:
Jun 25 09:27:07 foo bar[13219]: or other
How can I exclude those lines from the logged information?