Simple Awk

Simple AWK --- I have this in a file     Apr 02   and I want this Apr 2    I want to replace the only the leading 0 with a blank, I have tried using awk sub, (0,,file) and awk substr ($2,0,1) but I can not get the blank to work. Can I just delete the leading 0? Brain dead need help. thanks  

petro2Asked:
Who is Participating?
 
ahoffmannConnect With a Mentor Commented:
keep in mind that gsub is nawk, gawk

awk '{printf"%s %d",$1,$2}'
0
 
ozoCommented:
awk 'gsub(/ 0+/," ")'
0
 
ozoCommented:
awk '{gsub(/ 0+/," ");print}'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.