1755137 Members
2967 Online
108830 Solutions
New Discussion юеВ

Re: grep '-w' option

 
SOLVED
Go to solution
Carl Kalauokalani
New Member

grep '-w' option

Is the "-w" grep option XPG4 compliant? Why
is this option not available under HP-UX?

(On Solaris, the help for this grep option reads:
-w Search for the expression as a word as
if surrounded by \< and \>.
Is this implying a generic alternative?)

System is HP-UX B.11.00.

Thanks for any info...
4 REPLIES 4
Vincent Farrugia
Honored Contributor

Re: grep '-w' option

Hello,

you can use grep -w under HP/UX 11i, having the same characteristics as the Solaris one.

HTH,
Vince
Tape Drives RULE!!!
Eugen Cocalea
Respected Contributor
Solution

Re: grep '-w' option

Hi,

I believe that 'grep' that comes with the standard HPUX 11.00 (that I use) does not have the '-w' option. You can use, instead, grep-2.5a, that does.

You can take it from:

http://hpux.tn.tudelft.nl/hppd/hpux/Gnu/grep-2.5a/

the man page (read it before installing it, to see it supports '-w' ;) ) is at:

http://hpux.tn.tudelft.nl/hppd/hpux/Gnu/grep-2.5a/man.html

hope this helps,

E.
To Live Is To Learn
Vincent Farrugia
Honored Contributor

Re: grep '-w' option

Yep, I tried on both HP/UX 11.00 and 11i, I couldn't find the -w option in the man page on the 11.00 machine, and I could find it in the man page on the 11i machine.

HTH,
Vince
Tape Drives RULE!!!
Carl Kalauokalani
New Member

Re: grep '-w' option

Thanks very much for the help;
looks like GNU is the way to go... :-)