grep command is pretty neat-o. 8) But I find it lacking :P
What I want to do is
But the other information after the PID (ie. "? 00:00:00 konsole" ) is ruining my kill command.
How can I do this in a simple script without breaking out the gcc. (I haven't rented the C book from the library yet.)
(note: this is just an example. I do have other uses for the kill and grep commands. I do have other ways of killing the konsole i'm typing into)
Code:
ant2ne@ant2ne-laptop:~$ ps -A | grep "konsole" 15400 ? 00:00:00 konsole ant2ne@ant2ne-laptop:~$
ant2ne@ant2ne-laptop:~$ ps -A | grep "konsole" > kill
How can I do this in a simple script without breaking out the gcc. (I haven't rented the C book from the library yet.)
(note: this is just an example. I do have other uses for the kill and grep commands. I do have other ways of killing the konsole i'm typing into)
Comment