for procid in $(ps -aux | grep "some search" | awk '{print $2}'); do kill -9 $procid; done
hello friends .. we can do it using for loop .
"Some search" is here any process name you want to search, for example "java" so let say count of java process is 200+ so killing one by one will be too typical .
You might not need pipe for this, if you have pidof command and know the image name, I did it like this:
kill $(pidof synergyc)
$() I understand this as it converts that output to a variable that kill can use, essentially like pipe would do. Shorter and easier to understand than some other options but also maybe less flexible and more direct.