[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in grep?
From: |
tido |
Subject: |
Bug in grep? |
Date: |
Fri, 27 Sep 2002 08:04:54 -0700 |
Is this a bug? or a lack of knowledge about regular expressions on my part:
(sorry for the long lines - but this is my environment)
==Grep Version==
> grep -V
grep (GNU grep) 2.5
Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
==Regex Without trailing ":"==
> echo -ne "0:0: t2 \n1000:407: t2/test1 \n1000:666: t2/test2 \n666:407:
> t2/test3 \n666:666: t2/test4 \n" | grep -Ev
> "^(0|1|2|3|4|5|6|7|8|9|10|11|13|14|16|21|25|31|32|33|35|40|60|70|81|84|85|89|200|201|202|203|204|205|206|207|405|65534|22|1000|0):(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|25|26|27|31|32|33|35|40|60|70|80|81|84|85|89|100|200|201|207|208|406|65533|65534|407|0)"
666:407: t2/test3
666:666: t2/test4
(wrong)
==Regex With trailing ":"==
> echo -ne "0:0: t2 \n1000:407: t2/test1 \n1000:666: t2/test2 \n666:407:
> t2/test3 \n666:666: t2/test4 \n" | grep -Ev
> "^(0|1|2|3|4|5|6|7|8|9|10|11|13|14|16|21|25|31|32|33|35|40|60|70|81|84|85|89|200|201|202|203|204|205|206|207|405|65534|22|1000|0):(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|25|26|27|31|32|33|35|40|60|70|80|81|84|85|89|100|200|201|207|208|406|65533|65534|407|0):"
1000:666: t2/test2
666:407: t2/test3
666:666: t2/test4
(right)
i'd be interested to know if you get different results...
odiT
P.S.
Now you know my UID/GID... <grin>
Get your free encrypted email at https://www.hushmail.com