|
|
How to Print your name (string) with 100 times? - Shell Scripting
|
Views : 283
|
|
Tagged in : Shell Scripting
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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 |
|
|
|