[NTLUG:Discuss] kill command

Val Harris valwharris at verizon.net
Sat Jun 13 06:53:01 CDT 2009


Ralph Green wrote:
> Howdy,
>   I tried the following command and it does not quite work, and I don't
> see why.  Any suggestions?
> 
> ps -A -o pid -o cmd | grep "update-notifier" | cut -c1-5 | kill
> 
>  If I do it without that last bit, I get the pid of the process I want
> to kill.  How do I need to change this to kill that process?  I know it
> will also get the pid of the grep command and kill that process, but I
> can't see that that would hurt anything.
> Good day,
> Ralph
> 
> 
> 
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
> 

assign the pid to a variable, ie: PID and then execute "kill $PID".

-- 

Val W. Harris            valwharris at verizon.net

"It's the hardest thing in the world to accept a little
  success and leave it that way." - Marlon Brando




More information about the Discuss mailing list