Quantcast
Channel: Bash operator < , > , | and grep / kill - Super User
Browsing latest articles
Browse All 8 View Live

Answer by Rich Homolka for Bash operator < , > , | and grep / kill

Most Linuxes have pkill (and pgrep) which do what you want.pkill nautilus

View Article


Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article

Bash 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

Browsing latest articles
Browse All 8 View Live