bash script loop
hi
i'm new to linux...
i 'm building a bash script to automate some jobs & commands....
i need to check n times a condition and then exit...
the below example i think will repeat a cycle 5 times.....
___________________
for i in 1 2 3 4 5
do
echo "Welcome $i times"
done
_______________________
then does not matter what instructons i will put insiede the do - done
delimiters....
now the question...if i have to repeat a loop to check a condition 100 times
what is the syntax ?
i have to specify all the numbers from 1 to 100 in the for instruction
or there is something like..... "for 1 to 100"
then in another thread i opened ,it was suggested me to learn about
script looking into some guides....
these guides are useful,but i still have not found a reference guide of the
bash script language....
a reference where i can look to the "for" instruction and see the syntax ....
sumarizing ....... i need to know if there is a simplier syntax about the
sample code to repeat 100 times...and if there is a reference book about bash script language..a book where all the instruction are listed in alphabetical order...
thanks in advance
Maurizio
|