I sometimes do this in my shell:
sam@sam-laptop:~/shell$ ps aux | grep firefox | awk '{print $2}'
2681
2685
2689
4645
$ kill -9 2681 2685 2689 4645
Is there a way to convert multiple lines containing a PID into one line separated by spaces? (It’s a little annoying to dial PID every time, and I really would like to know :))
Many thanks.
Zenet source
share