Liunx reported an error

shenjianlin@newdev:~ (spider) $ps-ef | grep searchwebsite | awk "print $1" | xargs-I kill-9 {}
awk: cmd. Line:1: print $1
awk: cmd. Line:1: ^ syntax error
shenjianlin@newdev:~ (spider) $

Why do you ask for advice?

Jan.10,2022

I don't know what you want to do, but guess from your kill that you want to get the previous pid ?

your awk syntax is incorrect. You need a {} , that is,

.

ps-fe | grep searchwebsite | awk'{print 1}'| xargs-I kill-9 {}

where you may need to replace the print 1 of awk with the correct column: $1 or $2

Menu