My requirement is to print date like this,04.10.2015  I have tried,d=`date '+%d%m%y'`But the problem what was happening, it was printing those dates which are two digits (10 to 31). But 1 to 9 date was not printing like 01..02..09For the single date, the out was coming like this,  4.10.2015I think its digit problem. What format should I have to use to print single date in double digit?
Print a date with leading zeros
date
The command date '+%d.%m.%Y' creates this output: 14.06.2015.To assign it to a variable d use: d=$(date '+%d.%m.%Y').