[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wc -l behaviour
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: wc -l behaviour
- From: Han Boetes <han_(_at_)_mijncomputer_(_dot_)_nl>
- Date: Sat, 18 Dec 2004 01:26:04 +0100
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
-f wrote:
> why the extra whitespace?
Because that's how it's coded
> could the behaviour be changed that when one of -c, -l, -m, -w
> was specified, the whitespace was trimmed?
Of course!
> isn't that sensible?
You have my blessing, but you have to take POSIX in account:
http://www.opengroup.org/onlinepubs/009695399/utilities/wc.html
And that the GNU version of wc doesn't do it doesn't mean BSD
shouldn't do it. Though I admit I can't find anything that says
that leading whitespace must be added.
In the meantime I hope this will do for you:
wc -l < .zshrc | sed -e 's| ||g'
# Han
Visit your host, monkey.org