Hello,
I have a script that contains this(shown below). My problem is how do I
change
the values in the "for loop" statement? I tried doing another "if"
statement
but unluckilly I was unsuccessful. Needs some help.
Thanks in advance.
albertus:)
A part of my script.
####
if [[ $1 == "file1" && $2 == "name1" && $# == 2 ]]
then
some commands.
var=`commands`
#If var=A, then my for loop will be "for i in 1 2 3"
#If var=B, then my for loop will be "for i in 1 2 3 4 5"
#If var=C, then my for loop will be "for i in 1 2 3 4 5 6 7 8 9 10
#and so on... I need to do this with "only one"
#"for loop" statement. Any ideas....
for i in ???
do
some commands
done
else
some commands...
fi
###