[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "ls" spacing between columns
From: |
Jim Meyering |
Subject: |
Re: "ls" spacing between columns |
Date: |
Sun, 11 Apr 2004 00:37:22 +0200 |
"Alfred M. Szmidt" <address@hidden> wrote:
...
> > Mmm... Maybe there is even a smallish bug in POSIX, from the
> > example section (ls -laRF):
> >
> > -rwxr--r-- 1 hlj prog 572 Jul 4 12:07 foo*
> >
> > That doesn't corespond with the above rule for -l. Should this
> > be reported to the OpenGroup?
>
> What part doesn't correspond?
>
> One (two for the file permission and link count) space between each
> field. Where as the example has more then one/two spaces between each
> field.
>
> "%s %u %s %s %u %s %s\n", <file mode>, <number of links>,
> <owner name>, <group name>, <number of bytes in the file>,
> <date and time>, <pathname>
I don't remember the rationale, but seem to recall that
there was no restriction on field widths, so using %2d
(as might have been done for the sample line's link count)
would be conforming. Besides, some variance is required
if you want to make varying-length user names align in columns.
Same with link counts of 1 and 99.
Re: "ls" spacing between columns, Jim Meyering, 2004/04/10