[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use variable in a range like {a..b}?
From: |
Stephane CHAZELAS |
Subject: |
Re: How to use variable in a range like {a..b}? |
Date: |
Wed, 08 Dec 2010 15:48:13 -0000 |
User-agent: |
slrn/pre1.0.0-18 (Linux) |
2010-05-12, 08:20(-04), Greg Wooledge:
[...]
> x=10; i=1; while [ $i -le $x ]; do ...; i=$(($i+1)); done
And
seq 10 | xargs -n1 ...
or:
seq 10 | xargs -I% ... % ...
like:
seq 10 | xargs -I% echo '<%>'
Both of which will work in any shell (provided you have the
seq command).
--
Stéphane
- Re: How to use variable in a range like {a..b}?,
Stephane CHAZELAS <=