Forum Discussion
Altera_Forum
Honored Contributor
19 years ago<div class='quotetop'>QUOTE </div>
--- Quote Start --- unfortunately there is no top command so I got to write a script to execute the ps command every 3s and write results to a file.[/b] --- Quote End --- Hi, well, I wrote that script and it works fine with one exception: I want to launch the ps command every 3s and save results in mfm.txt till the q key is pressed. I'm still testing it in Redhat before implementing it in µClinux. The only problem is how to get the q key stopping the execution of the script # ################################## # !/bin/sh touch mfm.txt until [ "$*" = "q" ]; do sleep 3 date >> mfm.txt ps >> mfm.txt echo " " >> mfm.txt; done # ################################## Can anybody help me with that ? Warm Regards