Word-oriented GREP
Taed Nelson
nelson at berlioz.nsc.com
Mon Apr 15 11:46:26 AEST 1991
When I use the command "grep V\[0-9\]\[0-9\]\[0-9\] fred.c" it returns
#define VERSION "V002"
or somesuch. What I would really like is just the string of characters
which matched:
V002
I thought about it for a while, and I couldn't come up with anything; even
AWK seems to offer no nice way of doing it, but this seems like something
that is at least somewhat common...
Does anyone have any suggestions, preferably limiting the solution to SH or
CSH, and by not using uncommon tools such as PERL?
Thanks a lot!
More information about the Comp.unix.questions
mailing list