The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 02-03-2008
thms_sum thms_sum is offline
Registered User
 

Join Date: Jan 2008
Posts: 13
thanks Lakris!! it works!!! thanks!!!

but if i wanted to grep the input from user and kill the process how should i do it? i try but couldnt work!!!

Code:
echo "enter program name"
read input

ps -ef U username|grep $input | awk '{print $2}' | xargs killall
Reply With Quote