[H-GEN] Samba on SuSE 8.1

Tony Nugent tony at linuxworks.com.au
Wed May 7 20:43:14 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On Thu May 08 2003 at 09:43, "Michael Anthon" wrote:

> From: "Jason Parker-Burlingham" <jasonp at uq.net.au>
> 
> > The [s] in "[s]amba" means "match any of the characters `s'".  If we
> > put extra characters in there ([abc]) it would match any of them at
> > all ("a", "b" or "c").  But for "[s]amba" can't match itself in the ps
> > output because there is nothing to match the brackets!  Huzzah!
> 
> Ooooh, nice one, much better than my usual solution (when I care to remove
> it) of using
> ps auxww | grep processname | grep -v grep

In fact, you can refine that even further...

  ps auxww | grep processnam\[e\]

The "\[" and "\]" characters change the grep'ed string to glob only
matches on the regular expression - which doen't include the grep
command itself.  (You can use this on any single character within
the process name).  Neat trick, try it.

> /me adds that one to his list of tricks

/you can add this one too :)

> Cheers
> Michael

Cheers
Tony

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list