I run the following at regular intervals in order to sync my laptop with my desktop. When there's nothing to do, and therefore no output from unison, i want it to complete silently; when there's syncing to be done, t want it to pop up in a terminal so I can accept or reject changes as required.
Currently, it always pops up a window regardless and i'm harassed by occasional blank terminals appearing and disappearing. Here's the command that I run automatically every 30 minutes or so:
ps -e | grep -i unison || xterm -e 'unison -auto -perms=0 -terse Local_Sync
Can anyone think of a better way to accomplish this?