Date capture & filter

view story

http://www.unix.com – Dear All, I am capturing system date and creating the file by using that time stamp, file is getting appended with checks of application & database check logs. But when the date is in between 1 to 9 both inclusive, it appends a single space to file name but after 9th it works fine. Code: tmstmp=`date +%e%b%Y_%H%M%S` file_name=Daily_Check"_"${tmstmp}.out Output for the same is below: Daily_Check_ 7Jan2013_124706.out Daily_Check_26Jan2013_070036.out Desired output is below: Daily_Check_7Jan2013_124706.out Daily_Check_26Jan2013_070036.out Request you to help for the (HowTos)