[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wc
From: |
Pádraig Brady |
Subject: |
Re: wc |
Date: |
Fri, 12 Jun 2009 15:00:56 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
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.
- wc, Iram CHELLI, 2009/06/12
- Re: wc, Pádraig Brady, 2009/06/12
- Re: wc,
Pádraig Brady <=
- Re: wc, Eric Blake, 2009/06/12
- Re: wc, iram chelli, 2009/06/12
- Re: wc, iram chelli, 2009/06/12
- Re: wc, Bob Proulx, 2009/06/12
- Re: wc, iram chelli, 2009/06/12
- Re: wc, Giuseppe Scrivano, 2009/06/12
- Re: wc, iram chelli, 2009/06/12