[NTLUG:Discuss] How do I set Date in Filename in Bash

Dennis ddaupert at indy.rr.com
Mon Feb 16 09:46:57 CST 2004


Bash tuts show me the trick of getting date parts from date, thus:

MYDATE=`date +%b%d%y`
echo "Datestring:" $MYDATE

I read man date, and see the various flags. I need to name directories
like: 02.16.04, but the closest I see using date's flags is:

MYDATE=`date +%D` which give 02/16/04.

How do I change the '/' to '.'? 

TIA

/dennis






More information about the Discuss mailing list