This question already has an answer here:
I am facing following issue:
F=`date +%Y%m%d` echo $F
But when trying this(File Name:A.sh):
C=`date` G=`$C +%Y%m%d` echo $C echo $G Output: A.sh: Tue: not found Tue Dec 31 06:14:12 EST 2013
I want to pass the date in a variable and then extract only date in a specific format.