Should xgrep '5!' and xgrep -v '5" not print identical output? I get different output for both:
(set -x ; printf '123\n234\n345\n456\n' | xgrep '5!') + xgrep 5! + printf '123\n234\n345\n456\n' 123 234 345 456 (set -x ; printf '123\n234\n345\n456\n' | xgrep -v '5') + xgrep -v 5 + printf '123\n234\n345\n456\n' 123 234 Olga On Tue, Feb 23, 2010 at 11:38 PM, Glenn Fowler <[email protected]> wrote: > > On Tue, 23 Feb 2010 23:32:33 +0100 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= > wrote: >> Is there anywhere a document which describes the differences between >> egrep and xgrep including some examples? > > no document > conjunction is the & binary operator > negation is the ! unary postfix operator > > you can see some test patterns with expected results by > > grep '^A.*[&!]' src/cmd/re/*.dat > > the syntax of the .dat files is documented by > > testregex --man > > src/cmd/re/testregex.c is a standalone regex test harness > > -- , _ _ , { \/`o;====- Olga Kryzhanovska -====;o`\/ } .----'-/`-/ [email protected] \-`\-'----. `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'` /\/\ /\/\ `--` `--` _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
