- Nov 21, 2001
- 2,057
- 0
- 0
I've got a piped command like so in a Bourne shell script..
/usr/ucb/ps -auxc | grep "$1$"| awk'{print $2}'> temp
but I'm not sure how to be able to extract the process ID numbers from there and use the kill command on the results given.
Do I need to make it somehow output each single result and then apply kill.. or can it do it to all?
any ideas?
/usr/ucb/ps -auxc | grep "$1$"| awk'{print $2}'> temp
but I'm not sure how to be able to extract the process ID numbers from there and use the kill command on the results given.
Do I need to make it somehow output each single result and then apply kill.. or can it do it to all?
any ideas?