Script queries
by LYC from LinuxQuestions.org on (#51D6X)
Hi,
When I execute the following in command line, it works
$ for i in {1..930}; do date >> output.log; prstat -a 1 1 >> output.log; sleep 60; done
When I put them in a file as follows and run the file, it only run once:
#!/usr/bin/sh
for i in {1..930}
do
date >> output.log
prstat -a 1 1 >> output.log
sleep 60
done
Seeking for advice?


When I execute the following in command line, it works
$ for i in {1..930}; do date >> output.log; prstat -a 1 1 >> output.log; sleep 60; done
When I put them in a file as follows and run the file, it only run once:
#!/usr/bin/sh
for i in {1..930}
do
date >> output.log
prstat -a 1 1 >> output.log
sleep 60
done
Seeking for advice?