Created
January 8, 2014 20:53
-
-
Save coderofsalvation/8324473 to your computer and use it in GitHub Desktop.
remove lines with certain strings from crontab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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