running ksh scripts indefinetely
Hi!
My name is Swami and I have a question.
Well, I'm running a script that gets input from top and provides user with cpu n mem usage of processes. I want this to run with command line options as well as without cmnd line options.
For eg, <script name> - no options should make it run forever. Else, <script name> -n <no of times> -t <time in secs> should make script run the specified no of times after the interval. Is there any way to do this? I have already devised a case condition to evaluate the options, if provided. But, I'm stuck while trying to combine both.
Can some one provide suitable a suggestion?
Thanks in advance.
Regards
S.Swaminath.
|