1

Setting an environment variable in cron

view story
linux-howto

https://bbs.archlinux.org – My naming convention for directories and archives which involve backing up certain files and staging updates for applications in /opt involves including the day's date. Just to make my life a tad bit easier, I figured I could use a cron job to automatically contain the day's date in a variable which automatically updates itself when the date changes. This way, I can just create these directories using something like mkdir update-"$date" for example, instead of having to type out mkdir update-08-27-2012 myself every time.These are the contents of the "datevars" scr (HowTos)