Skip to content

Commit f4116c2

Browse files
authored
Create example6_for_loop.sh
1 parent 6d94a90 commit f4116c2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

example6_for_loop.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
#This Script will demostrate the use of for loop in varies way
4+
5+
#For Loop Example-1
6+
echo " For Loop Example -1"
7+
for i in 1 2 3 4 5
8+
do
9+
echo "hello $i"
10+
done
11+
12+
#For Example -2
13+
for i in {1..5}
14+
do
15+
echo "Hello Example2 $i"
16+
done
17+
18+
#For Loop Example-3
19+
for (( i=1; i<=5; i++ ))
20+
do
21+
echo " example3 says Hello $i"
22+
done

0 commit comments

Comments
 (0)