something like that?
for i in `seq 1 20 | awk 'BEGIN{n=0; max=4; avg=max/2}{if (n=avg) {print
$0;} n++; if (n=max) {n=0;} }'`
do
echo welcome $i times
done
On Sat, Dec 11, 2010 at 3:34 PM, S Mathias smathias1...@yahoo.com wrote:
, that i can use this, when i want
--
Samuel Martín
with seq starting with 0, to fit your example...
On Sat, Dec 11, 2010 at 5:34 PM, Samuel Martín Moro faus...@gmail.comwrote:
something like that?
for i in `seq 1 20 | awk 'BEGIN{n=0; max=4; avg=max/2}{if (n=avg) {print
$0;} n++; if (n=max) {n=0;} }'`
do
echo welcome $i times
done
also... if (navg) ... sorry for the sp am...
On Sat, Dec 11, 2010 at 5:36 PM, Samuel Martín Moro faus...@gmail.comwrote:
with seq starting with 0, to fit your example...
On Sat, Dec 11, 2010 at 5:34 PM, Samuel Martín Moro faus...@gmail.comwrote:
something like that?
for i in `seq 1 20 |
On Sat 11 Dec 2010 at 06:34:20 PST S Mathias wrote:
It's ok, that i can use this, when i want an incrementing sequence, in a given
way:
# {START..END..INCREMENT}
$ for i in {0..10..2}; do echo Welcome $i times; done
Welcome 0 times
Welcome 2 times
Welcome 4 times
Welcome 6 times
Welcome 8
On Sat 11 Dec 2010 at 09:57:08 PST Charlie Kester wrote:
On Sat 11 Dec 2010 at 06:34:20 PST S Mathias wrote:
It's ok, that i can use this, when i want an incrementing sequence, in a given
way:
# {START..END..INCREMENT}
$ for i in {0..10..2}; do echo Welcome $i times; done
Welcome 0 times