5

Get file name which include the current date

view full story
linux-howto

http://www.unix.com – Hi, I'm trying to get the name of a file that has the current date in the name. The filename is on the form A<current date>01.DC, for example A2012110501.DC I have this script so far Code: date +%y%m%d D=$(date +%y%m%d) N=A20$D echo $N N2={$N}01.DC echo $N2 And gets the following output Quote: A20121105 }01.DC1105 When I try to add the last part "01.DC" to N something weird happens. Any ideas on how to get the wanted result? (HowTos)