[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request for wc new switch -t
From: |
Pádraig Brady |
Subject: |
Re: Feature request for wc new switch -t |
Date: |
Fri, 03 Jul 2015 17:43:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 03/07/15 17:21, Leslie S Satenstein wrote:
> There are numerous situations where of the following
>
> mycount = wc -l somefile
> mycount is very very often followed by
> cut -d' ' -f1 as
> lines=$(wc -l somefile | cat -d' ' -f1)
>
> In otherwords, we want the numerical value lines, but not the text
> following. A new flag, -n would be useful as in
>
> lines=wc -t somefile to be equivalent to lines=$(wc -l somefile |
> cat -d' ' -f1).
>
> Savings would be the piping of the wc output followed by call to external
> file "cut".
>
> -t for truncated
Already supported with:
lines=$(wc -l < somefile)
cheers,
Pádraig.
- Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, jon, 2015/07/03
- Re: Feature request for wc new switch -t, Leslie S Satenstein, 2015/07/03
- Re: Feature request for wc new switch -t,
Pádraig Brady <=
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, Ray Dillinger, 2015/07/03
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, Valdis . Kletnieks, 2015/07/04
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, jon, 2015/07/04
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, Al Viro, 2015/07/05
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, jon, 2015/07/05
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, Al Viro, 2015/07/05
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, jon, 2015/07/05
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, Al Viro, 2015/07/05
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, jon, 2015/07/05
- Re: Feature request, "create on mount" to create mount point directory on mount, implied remove on unmount, Al Viro, 2015/07/05