Answer by Rich Homolka for Bash operator < , > , | and grep / kill
Most Linuxes have pkill (and pgrep) which do what you want.pkill nautilus
View ArticleAnswer by Phil P for Bash operator < , > , | and grep / kill
The | operator feeds the "standard output" (stdout) from the left to the "standard input" of the right; standard input, or stdin, is equivalent to "what I read as though from the user if they type into...
View ArticleAnswer by matchew for Bash operator < , > , | and grep / kill
ps -A | grep nautilus | awk '{print "kill " $1}' | bashI would do it this way, but there are many ways to execute the same thing =)I had this answer written out in detail on stackoverflow, to find it...
View ArticleAnswer by Diego Sevilla for Bash operator < , > , | and grep / kill
You can also try killall:killall nautilus(from the package psmisc, at least in debian/ubuntu).
View ArticleAnswer by Vlad for Bash operator < , > , | and grep / kill
I would go for xargs:ps -A | grep nautilus | egrep -o '[0-9]{4,5}' | xargs -L 1 killActually, kill accepts multiple arguments, so -L 1 is not strictly needed.
View ArticleAnswer by Fredrik Pihl for Bash operator < , > , | and grep / kill
If you know the name of the executable, it is better to use pidofto find the pid of the running program.
View ArticleAnswer by aioobe for Bash operator < , > , | and grep / kill
Trykill `ps -A | grep nautilus | egrep -o '[0-9]{4,5}'`The commands within the backticks will be executed and fed as a part of the command.
View ArticleBash operator < , > , | and grep / kill
As an exercise, I wanted to kill a process by command line using basic bash principles but i'm having some errors that i don't understand:ps -A | grep nautilus | egrep -o '[0-9]{4,5}' | kill1) It...
View Article