How do I find a word?

Guy Harris guy at auspex.auspex.com
Thu May 2 03:40:12 AEST 1991


>  With "grep", you can use the "-w" argument to tell it to look for words only.

Well, with some flavors of "grep", anyway.  I think Berkeley introduced
the "-w" flag; "-w" is shorthand for "stick a \< and a \> around the
pattern", and the BSD "grep" supports the "\<" and "\>" items as well.
 
S5's standard regular expression package doesn't support "\<" and "\>"
prior to S5R4, although we added them in SunOS 4.0; "ed", "grep", and
various other programs use them.  S5R4's standard regular expression
package does, I think, support them.



More information about the Comp.unix.questions mailing list