Output for loop to a file
I am trying to have a for loop output to a text to a file 10 times. Here
is what I have:
for ((i=1;i<=10;i++)) ; do echo "Hello World" > testforloop.txt ; done
This outputs "Hello World" once to the file "testforloop.txt". If I don't
output to file it prints Hello World to the screen 10 times. Thanks for
any help.
No comments:
Post a Comment