Article 51D6X Script queries

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?latest?d=yIl2AUoC8zA latest?i=8HMYZ0m5StI:4-KDLFAaNUQ:F7zBnMy latest?i=8HMYZ0m5StI:4-KDLFAaNUQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=8HMYZ0m5StI:4-KDLFAaNUQ:gIN9vFw8HMYZ0m5StI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments