Skip to content

Instantly share code, notes, and snippets.

@KendallHopkins
Created November 25, 2010 05:37
Show Gist options
  • Save KendallHopkins/714960 to your computer and use it in GitHub Desktop.
Save KendallHopkins/714960 to your computer and use it in GitHub Desktop.
#!/bin/sh
if ps ax | grep -v grep | grep rsync > /dev/null
then
echo "command is still running"
else
echo "command started"
rsync ...
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment