Soz im a bit newbie...
I want to do:
ps -A | grep firefox | kill $1
it should kill the pid associated, but it doesnt work.
$1 is the pid (if i do a awk {'print $1'} i get it ) , but kill doesnt take it as such...
How can i do it?
Soz im a bit newbie...
I want to do:
ps -A | grep firefox | kill $1
it should kill the pid associated, but it doesnt work.
$1 is the pid (if i do a awk {'print $1'} i get it ) , but kill doesnt take it as such...
How can i do it?
from a working example to killall -9 nobody owned processes:
kill -9 `ps aux|grep perl|grep nobody|awk '{print $2}'`
from your example:
kill -9 `ps -A | grep firefox | kill $1`
or why not just killall -9 firefox ?
Someone with more experience will have some input too!
Try this:
kill `ps -A|awk '/firefox/{print $1}'`
Thx for your replies!
The last one works fine! ^^