How to Print your name (string) with 100 times? - Shell Scripting Views : 283
Tagged in : Shell Scripting
0 0
Send mail
Print your name with 100 times
Use the below code to print the particular string into 100 times
(*)Create test.sh file
echo $0
n=$1
for(( i = 1 ; i <= 100 ; i++ ))
do
echo "$n $i times"
done

(*) Execute test.sh file
sh test.sh hiox
Output
hiox 1 times
........
hiox 100 times

The above program will print upto 100.
By Nirmala, On - 2010-01-25



    Login to add Comments .