How to stop all old process in one command

I hve more than 200 old backup process running when I issue
ps -ef| grep bp

how can i kill all the 200 backup process in HPUX
Who is Participating?
arnoldConnect With a Mentor Commented:
do not know HP-UX, but I  know awk.
There is a missing closing /
Try without the xargs kill first
ps -ef | awk '/[b]p/ {print $2}'  
If you get a list of PID,
ps -ef | awk '/[b]p/ {print $2}'  | xargs kill
Assuming a modern version of HP-UX

pkill bp

or the longer way

ps -ef | awk '/[b]p {print $2}'  | xargs kill
supportproAuthor Commented:
# ps -ef | awk '/[b]p {print $2}'
 syntax error The source line is 1.
 The error context is
                /[b]p {print >>>  $2} <<<
 awk: Quitting
 The source line is 1.

please provide the corrected syntax
supportproAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.