Hi Anders At 16:10 22/09/02 +0200, Anders Åkesson wrote: > > > > $ ps axc | grep [x]ntpd > > > > Put [ ] around xntpd. > > > > Again, haven't tested on ash, just on ksh. But presuming it is a sh > > compatible shell, it should work. > > > >Weeee! :D > >Works like a charm. Seems that [x] makes all the difference. What does >it do? (Trying to learn a bit about scripts..)
This is all pretty much straight from a textbook I read recently - I'm not that clever :) It was presented as the standard way of stopping grep processes matching themselves in process lists generated by the ps command. [x]ntpd is a regular expression that only matches the string xntpd, but the entry the grep command generates in the `ps axc` list will be "grep [x]ntpd", so won't match. cheers Julian -- [EMAIL PROTECTED] www.ljchurch.co.uk ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html