> It seems, but it concerns me that one can't rely on the width in the format
> specification for visual column alignment of tabular data. "C", but not awk,
> may have additional format modifiers to make this work. Probably even
> worse for DBCS with shift-in/shift-out sequences.
>
>>> On Feb 20, 2016, at 7:37 PM, Paul Gilmartin wrote:
>>>
>>> 735 $ LC_ALL=en_US.UTF-8 awk 'BEGIN { printf( "%5s\n%5s\n12345\n", "A", "Ж"
>>> ) }'
>>> A
>>> Ж
>>> 12345
The alignment for printf comes in the spec - the 5 is max width, any padding
for alingnment has to come before - such as
awk 'BEGIN { printf( "% 2s \n%05s\n12345\n","A","#") }'
A
0000#
12345
Or were you saying something else? — But agree that C isn’t the best choice
for tabular display / processing of record based data by any stretch.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN