[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bugs about grep

From: 杨华
Subject: bugs about grep
Date: Thu, 08 Jul 2004 10:52:58 +0800

Hi :
        I got a file abc :
ACCEPT     all  --  
ACCEPT     all  --            MAC 
ACCEPT     all  --   
ACCEPT     all  --  10.123.3   
DROP       all  --  

And I want to find out the line contain "" .
When I do :
#cat abc | grep -Fw
        ----no result .
#cat abc | grep -F | grep -w 
ACCEPT     all  --   
        ----give out line3 , right answer

also if I delete the first two line in abc file , the result will be
different . both the two command give out the same right answer. 
#cat abc | grep -Fw
ACCEPT     all  --   
#cat abc | grep -F | grep -w 
ACCEPT     all  --   

after many retries , I found if I delete the '9' of '' in line2
or change "39" to whatever not "3x" , then both command can give the
right answer. 

does that means a bug ?

by the way , I have try it on solaris , and find the same problem :
I use "cat abc | /usr/xpg4/bin/grep -Fw" also give no answer.
the solaris is "SunOS ns1 5.7 Generic_106541-02 sun4u sparc SUNW,Ultra-250"

Richard Young.
杨华 <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]