i have a file like this
123123213,456,be
124243233,4346,ytr
123123123,436535,uytr
324234324,322,yt
234324323,32,tyutr
and want to zero pad the middle field to give the result
123123213,00000456,be
124243233,00004346,ytr
123123123,00436535,uytr
324234324,00000322,yt
234324323,00000032,tyutr
can anyone think of ascript that woudl do this
I've seen an example like this
awk '{ $6=sprintf("%06s", $6); print $0}'
but i dont really understand it so cant get it working
