I would ask you how to solve this problem: I need to prepend 0s to every line where the word has less than 4 letters.
Example input file:
30
1
508
A0EA
A0EB
A0EC
A0ED
Desired output should be:
0030
0001
0508
A0EA
A0EB
A0EC
A0ED
Many thanks in advance for your support.
awk+printf
, see https://www.gnu.org/software/gawk/manual/html_node/Format-Modifiers.html#Format-Modifiers and https://www.gnu.org/software/gawk/manual/html_node/Printf-Examples.html – Sundeep Aug 05 '19 at 14:59