howto create a file based on date in bash
Hello,
I'd like to know how to create a file depending one current day of the month. I assume something like $ vi /home/xyz/report$DATE.txt where $DATE needs to be teh current date in any format. Any ideas? thx Rohan |
I tend to use:
date +%F_%T Which gives: 2004-05-07_20:23:16 So try: vi myfile_`date +%F_%T`.txt Using backticks like this you can put it in any command such as a tar command for backups etc. |
thx david.. that helped
:D |
All times are GMT -5. The time now is 03:36 AM. |