Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 [2] 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Simple shell-based daemon, More a template than useful in itself.< Next Oldest | Next Newest >
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: May 20 2007,03:02 QUOTE

I think he wants to _ignore_ gproftpd.
Using something like this might work: grep -e " proftpd$"

Or you could use awk ... much easier to deal with fields.
Back to top
Profile PM 
the Missing M Offline





Group: Members
Posts: 35
Joined: Mar. 2007
Posted: May 20 2007,15:48 QUOTE

Quote (mikshaw @ May 19 2007,02:41)
Try using spaces within quotes or after backshlashes:
grep " gproftpd "
or
grep \ gproftpd\ (<< a space)

Thanks.  :-)

But I think in this case it would fail on the *trailing* space, because ps tends to put the command name at the end of the line.



Patrick.


--------------
Q: What is the difference between
     a joke, and a lie?
A: A lie tends to obscure the truth,
     while a joke often reveals it.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: May 20 2007,15:53 QUOTE

I didn't notice that part.
So as ^thehatsrule^ said, use $ as the last part of the grep (with the -e option for expression)


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
the Missing M Offline





Group: Members
Posts: 35
Joined: Mar. 2007
Posted: May 20 2007,16:00 QUOTE

Quote (^thehatsrule^ @ May 19 2007,16:02)
I think he wants to _ignore_ gproftpd.
Using something like this might work: grep -e " proftpd$"

Ah.  And does the trailing `$' mean end of input?

Quote
Or you could use awk ... much easier to deal with fields.

Looks good, but from a quick skim through man [m]awk, it also looks like a bit more than I'm ready for.  Then again, it probably lists a lot of features I'd rarely use.

The FS / field separator thing kind of reminds me of the `text item delimiters' variable in AppleScript though.  Would come in handy, as soon as I figure out how to use it.  ;-)



Thanks,

Patrick.


--------------
Q: What is the difference between
     a joke, and a lie?
A: A lie tends to obscure the truth,
     while a joke often reveals it.
Back to top
Profile PM 
the Missing M Offline





Group: Members
Posts: 35
Joined: Mar. 2007
Posted: May 20 2007,16:03 QUOTE

Quote (mikshaw @ May 20 2007,04:53)
I didn't notice that part.
So as ^thehatsrule^ said, use $ as the last part of the grep (with the -e option for expression)

Umm...  Yeah I guess that is what it means.



Thanks again,

Patrick.


--------------
Q: What is the difference between
     a joke, and a lie?
A: A lie tends to obscure the truth,
     while a joke often reveals it.
Back to top
Profile PM 
14 replies since May 11 2007,03:11 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 [2] 3 >/
reply to topic new topic new poll
Quick Reply: Simple shell-based daemon

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code