NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/57252: wc
The following reply was made to PR bin/57252; it has been noted by GNATS.
From: RVP <rvp%SDF.ORG@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/57252: wc
Date: Thu, 2 Mar 2023 12:03:59 +0000 (UTC)
On Thu, 2 Mar 2023, Marc Daniel Fege wrote:
> thanks a lot for the help. As I understand it -- and I am just a user, not
> software developer at all -- SUSv4 2018 states something about unparsability of
> that format.
>
That's only an issue if there's no space between the format specifiers:
$ printf '%7u%7u%7u %s\n' 1000000 10000000 10000000 foo.txt
10000001000000010000000 foo.txt
$
but, all BSDs put a space like this, so that situation doesn't apply:
$ printf ' %7llu %7llu %7llu %s\n' 1000000 10000000 10000000 foo.txt
1000000 10000000 10000000 foo.txt
$
> Therefore: do those annoying spaces need to be there
> in the first place (to be compatible in one way or another)? The GNU-
> implementation is more reasonable in this regard one has to admit. This would
> enable to work out the issue by it's roots and not by a workaround.
>
Following POSIX strictly then results in an ugly display, right? Consider:
1 2 3 foo.txt
11111 222222 3333333 bar.txt
The padding is there because wc is most often used interactively. People
who write shell scripts know how to fix this annoyance anyway...
-RVP
Home |
Main Index |
Thread Index |
Old Index