bug-coreutils
[Top][All Lists]
Advanced

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

Re: wc


From: iram chelli
Subject: Re: wc
Date: Fri, 12 Jun 2009 21:46:46 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Pádraig Brady a écrit :
Pádraig Brady wrote:
You probably want to squeeze adjacent blanks:

wc FILE | tr -s '[:blank:]' ' ' | cut -d' ' -f2

Note you might wonder why cut doesn't support -d'[:blank:]'
to auto skip runs of horizontal whitespace. Details here:

http://lists.gnu.org/archive/html/bug-coreutils/2009-05/threads.html#00153

Note also that wc can output particular counts in isolation.
I.E. this will get the same affect as your original:

wc -w FILE | cut -d' ' -f1

cheers,
Pádraig.


Thanks Padraig,

I interesting information.

I had exactly been using this as a workaround.

Cheers,

Iram.




reply via email to

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