TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More regex...
Seeing the earlier post on regular expressions reminded me:
First of all, can anyone point me towards a good regular expression
tutorial?
And... When I use 'locate' I would like to be able to point it to just the
exact match for a file name.
Ex:
locate traceroute
returns:
/usr/doc/kde/HTML/en/knu/knu-traceroute.gif
/usr/man/man8/traceroute.8
/usr/sbin/traceroute
/home/insyte/.kpackage/traceroute-1.4a5-16.i386.rpm
when all I really wanted was /usr/sbin/traceroute.
It's not so bad in this case, but some other files will return two or three
screens of irrelevant information. I assume this would be a fairly simple
expression, but I just can't track down a way to do it.
Gracias,
Ben
----------
The phrasing, style, and content of this message are the sole property of
Ben Beuchler, Inc. and may not be reproduced in any way, shape or form
without the written consent Ben Beuchler Enterprises. All rights reserved.
Void where prohibited by law. Do not remove under penalty of law. Do not
spindle or fold. Not valid in Alaska, Hawaii, or Puerto Rico.