(Video materials in preparation)
pad0 : Add zeros to the beginning
Usage : pad0 <f1.w1> <f2.w2> .. <file>
Option : --ngthrough <str>
Version : Mon Jun 2 19:07:54 JST 2014
Pads the specified fields in the specified file or standard input
with zeros to the specified number of digits.
$ cat data
12 345 6789
$ pad0 1.5 2.6 data
00012 000345 6789
If the content of specified field is same as the string of --ngthrough
option, the field is not padded.
$ pad0 --ngthrough 345 1.5 2.6 data
00012 345 6789
Contiguous fields can be specified.
$ pad0 1.6/3.6 data
000012 000345 006789
NF or NF-<n> can be used as field specifier.
$ pad0 NF-1.6 data
12 000345 6789
1. The pad0 command does not look at the contents of the fields.
2. If the length of the field is already greater than the specified
number of digits then that field is not processed.
3. The fields must be specified in ascending order.