for loop
$ cat for1
for fruit
do
echo I really like $fruit
done
echo “Let’s make a salad!”
$ bash for1 a b c d
I really like a
I really like b
I really like c
I really like d
“Let’s make a salad!”
for fruit
do
echo I really like $fruit
done
echo “Let’s make a salad!”
$ bash for1 a b c d
I really like a
I really like b
I really like c
I really like d
“Let’s make a salad!”
Comments
Post a Comment