nitter
Joshua Wright
@joswr1ght
28 Apr 2014
How do I get left padding with awk and floating point values? echo 2.52 | awk '{printf("%4.2f\n",$1)}' produces "2.52" not "0002.52"
6
Hal Pomeranz
@hal_pomeranz
28 Apr 2014
Replying to
@joswr1ght
@joswr1ght
printf("%04.2", $1) -- note the leading zero after the percent
Apr 28, 2014 · 11:38 PM UTC