Kill multiple processes which match a pattern

The following kills all processes (in ubuntu) which match the word ‘test123’;

kill $(ps aux | grep test123 | awk '{print $2}')

Leave a Reply