Re: simple bash loop problem ...
David selby wrote:
I am writing bash a bash & sed script, it has been going suprisingly
well. I need a loop to count 9 times & the variable n to the count ..
for n=1 to 9
kind of thing, but this is not BASIC !!
My best guess is
declare -i n=1
while [ $n < 9 ]; do
All i get is ...
./gensite: 9: No such file or directory
I have defined it as an integer, used the less than operator for
integers, ... errr ... I know its something stupid but I can't crack
PS is there a more ellagent way to do a counted loop as well as a way
that works ?
Many many thanks from all you guys ... such a lot of ways of doing it,
kind of taken by the seq command .. linux seems to have a command tucked
away for everything !