When you call unison
in your sync.sh
script call it as follows:
unison ... 2>&1 | grep -vE '^[\|/-]|^$'
This will remove (-v
) all line that match the regual expression: All line beginning with one of those characters: \|/-
, or complete empty lines (^$
).
Edit: If you want the cronjob to be filtered, use:
@reboot /path/to/sync.sh -batch 60 2>&1 | grep -vE '^[\|/-]|^$' >> /path/to/logfile