(Video materials in preparation)
tagpad0 : Add zeros to the beginning
Usage : tagpad0 <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
$ tagpad0 tag1.5 tag2.6 data
tag1 tag2 tag3
00012 000345 6789
If the content of specified field is same as the string of --ngthrough
option, the field is not padded.
$ tagpad0 --ngthrough 345 tag1.5 tag2.6 data
tag1 tag2 tag3
00012 345 6789
Contiguous fields can be specified.
$ tagpad0 tag1.6/tag3.6 data
tag1 tag2 tag3
000012 000345 006789
There is no restriction on the order of field specification.
$ tagpad0 tag3.5 tag1.6 data
tag1 tag2 tag3
000012 345 06789
1. The tagpad0 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.