On Saturday 24 March 2007 07:16, [EMAIL PROTECTED] wrote: > whereas, I am sure there are 1000 reasons why it is not a good > script, > > . . . the following script "kl" usually works :-
Do you actually use that script? The process IDs produced will include that of the grep command, which will be gone by the time the kill occurs and thus elicit a diagnostic. Because the pattern is not bounded, or otherwise contextualized, it may find unrelated processes whose name, arguments or other ps output fields contain the target string specified. Using kill -9 as the first recourse inn terminating a process is usually inappropriate, but sometimes necessary. As I've said before, the "pidof" program is specifically designed to return the process IDs of those processes running a specific command. That's what should be used for this purpose. The default SIGTERM (15) should be used first and only if that fails to stop the process should SIGKILL (9) be used. Randall Schulz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]