Created
March 15, 2013 16:56
-
-
Save kawaz/5171356 to your computer and use it in GitHub Desktop.
crontab -r で r は e の隣のキーだから危険ってやつ。実際のところ -r に打ち間違えたことは無いんだけど保険としてこんなスクリプトをいつも使ってる。
This file contains 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
# save /etc/profile.d/seal-crontab-r.sh or append to ~/.bashrc | |
# crontab -r を封印する | |
function crontab() { | |
local opt | |
for opt in "$@"; do | |
if [[ "$opt" == "-r" ]]; then | |
echo '-r is sealed!' | |
return 1 | |
fi | |
done | |
command crontab "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment