Friday, January 18, 2013

Shell script: Using FOR loop

Here's a simple shell script to print numbers using for loop.

Just got through:


# cat test.sh

for ((i=0;i<=10;i++))
do

 echo $i

done



Output:



# sh test.sh
0
1
2
3
4
5
6
7
8
9
10

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

#Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc

 #Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc Linux is an open-source operating system that is loved by millio...