I'm having a bit of a problem with a script, i need to get the day, month and day of month into a string, so i'm using:
CURRENT_DATE=`date +"%a %b %e"`
It is getting the correct date out, however it is not keeping the padding on the day of month. The %e is supposed to pad the day of month, but it doesn't seem to want to.
What should be coming out is 'Fri Jan 9' (2 spaces padding before the 9), but it is giving me 'Fri Jan 9' (one space )
If i use the command 'date' in the unix shell it brings it in the right format, however if i use 'echo `date`' it removes the padding on the day of the month.
This is probably a very confusing post, i apologise!! Really hope someone can help