bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leading spaces from wc --lines


From: Paul Eggert
Subject: Re: Leading spaces from wc --lines
Date: Fri, 07 Jan 2005 13:58:10 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

address@hidden (Paul Jarc) writes:

> "Bryce Nesbitt (mailing list account)" <address@hidden> wrote:
>> The "wc" command always seems to place leading spaces on all results, 
>
> It doesn't for me, with 5.2.1.  Upgrade?

Yes, the behavior changed in 5.1.0.  wc still outputs leading spaces
in some cases, to make the columns line up, but if you can assume
coreutils 5.1.0 or later you can rely on "wc -l" to omit leading
spaces when it is given zero operands or one operand.

POSIX allows leading spaces, though, so you can't rely on this
behavior in portable code.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]