commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Another function to stick into your .bashrc
This spits out the time two minutes in the future, but already formatted for pasting into your crontab file for testing without any thought required on your part. Frequently things don't work the way you expect inside a crontab job, and you probably want to find out now that your $PATH is completely different inside of cron or other global variables aren't defined. So this will generate a date you can use for testing now, and then later you can change it to run at 5:37 am on a Sunday evening.
There is 1 alternative - vote for the best!
usage = crontest "/path/to/bin"
This version of this function will echo back the entire command so it can be copied/pasted to crontab. Should be able to be automagically appended to crontab with a bit more work. Tested on bash and zsh on linux,freebsd,aix
If you can do better, submit your command here.
You must be signed in to comment.