how do i do a simple for...next loop

I want to iterate a loop n times, i want to hand n via a shell parameter
like

test 13


will print something 13 times

so whats wrong with 

#!/bin/bash

iter=$1
while $iter>0 ; do
echo "rubbish"
iter=$iter-1
done

but 

./test 13

gives 
./test: 13: command not found

its trying to execute the command '13"

BAH!

--
"All that was needed was to parse the cat root slash dev etcetera file
for eth0 and pugle the forward identity-locking rehooliginator and
symlink it to the libgc perl humongisooler module after a kernel
decompile and basic repatch update." - theregister.co.uk

Reply via email to