Re: [PATCH] Fix use of wc in t0000-basic
- From
- Herbert Xu <herbert@gondor.apana.org.au>
- Date
- May 21, 2005, 10:37 UTC
- Message-ID
- <E1DZRMi-00021X-00@gondolin.me.apana.org.au>
- In-Reply-To
- <Pine.LNX.4.21.0505202045580.30848-100000@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> wrote:
> > - 'test "$(wc -l full-of-directories | sed -e "s/ .*//")" = 257' > + 'test $(cat full-of-directories | wc -l) = 257'
You don't need the cat:
wc -l < full-of-directories
will do the same thing.
It's also better to use -eq instead of = since you are comparing numbers, not strings. If you do that you can keep the double quotes since the spaces will be removed automatically.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt