Quantcast
Channel: Bash operator < , > , | and grep / kill - Super User
Viewing all articles
Browse latest Browse all 8

Bash operator < , > , | and grep / kill

$
0
0

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}' | kill

1) It doesn't work

If i try

ps -A | grep nautilus | egrep -o '[0-9]{4,5}'> kill

2) Doesn't work either

3) If i do (..) egrep '\d' (...) shouldn't this be the same as [0-9] ?

4) Is there any way that i do something like this:

kill < (greps (...) )

Viewing all articles
Browse latest Browse all 8

Trending Articles