Unix/Linux Go Back    

Keeping padding in a date field

Shell Programming and Scripting

Kindly Note - This is a Single User Post by Forum Member Ikon Regarding:
Keeping padding in a date field.
Please Follow The Primary Link Above to View the Full Discussion.

Old Unix and Linux 01-09-2009   -   Original Discussion by seanbyrne
Ikon's Unix or Linux Image
Ikon Ikon is offline Forum Advisor  
Computer Geek
Join Date: Jul 2008
Last Activity: 15 January 2015, 10:57 AM EST
Location: Frederick, MD
Posts: 748
Thanks: 4
Thanked 11 Times in 10 Posts
Why not use:

# date +"%a %b %d"
Fri Jan 09

It keeps 2 digit date.

%e does pad on my RedHat box:

# date +"%a %b %e"
Fri Jan  9

Ahh I get it now.. Just do what radoulov says....