I'm trying to use the date command as part of a bash script to make a directory based on the date. for example, currently there is a line in the script that is:
Code:
mkdir /home/ewto/2004_docs/$NAM
The $NAM is inputted by the user with the read command a few lines up.
What I would like to do is change the script so that the
command would cause the directory I currently call 2004_docs, "2004" or whatever the year is based on the current year.
This will prevent me having to edit the script every year, and once I have it working right, I might even change the "year" directory to a month.year combo to further make it easier to organize.