Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Created January 8, 2014 20:53
Show Gist options
  • Save coderofsalvation/8324473 to your computer and use it in GitHub Desktop.
Save coderofsalvation/8324473 to your computer and use it in GitHub Desktop.
remove lines with certain strings from crontab
# remove lines with certain strings from crontab
# @param string search
rmcron()
{ #remove cron job, returns 1 on error
[ -z "$1" ] && return 1
crontab -l | grep -v "$1" | crontab
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment