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,17:52 QUOTE

Well field separators are even in posix shells by standard...

You can look up "anchors" in regexp. Also, I think gnu's grep uses -e if needed automatically, but better keep to the standard (or use egrep.. which has slight differences)
Back to top
Profile PM 
mikshaw Offline





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

Quote
does the trailing `$' mean end of input?

I think it technically means "end of line" when talking about regular expressions in general, but i think in the case of grep, end of line and end of input would be pretty much the same.

I thought for a minute that  you might be able to do multiple lines with " grep end_of_first_line$beginning_of_next_line" (or something similar), but it seems to present unexpected results.


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





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 21 2007,15:40 QUOTE

for some reason the end-of-string anchor '$' doesn't work (v2.1b at least).

you can use the word boundary anchor '\b' instead

i.e   ps | grep "proftpd\b"

[Edit] oops,

or rather;      ps | grep "\bproftpd\b"        for the whole word.

[/Edit]
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: May 21 2007,17:35 QUOTE

humpty, that's probably a busybox bug... since that was updated in newer 3.x versions.
Back to top
Profile PM 
the Missing M Offline





Group: Members
Posts: 35
Joined: Mar. 2007
Posted: May 27 2007,11:39 QUOTE

Thanks, they both work.  :-)

It also issues a warning, before running the FTP server *and* PPP at the same time, now that my *nix-box can dial out directly [don't know if anyone noticed the addition of a `pon/poff' thing in there, but it's not hiding behind a router anymore].



Cheers,

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