I wanted to display the month for previous day date. Like, today date is 18-Nov-2008. So the previous date is 17-Nov-2008. The output should be November.
If the today date is 1-DEC-2008, then output should be NOVEMBER.
If the today date is 1-JAN-2008, then output should be DECEMBER.
If the today date is 31-DEC-2008 then output should be DECEMBER.
Here is the code i am having now.
export FILE_FORMAT=`date '+%B`
echo $FILE_FORMAT
it is working for the below scenario
If the today date is 1-DEC-2008, then output should be NOVEMBER.
If the today date is 1-JAN-2008, then output should be DECEMBER.