Re: [PATCH] Avoid problem with xpg4 grep in Solaris that broke t9400
- From
Ben Walton <bwalton@artsci.utoronto.ca>
- Date
- Apr 19, 2012, 17:39 UTC
- Message-ID
- <1334857109-sup-7979@pinkfloyd.chass.utoronto.ca>
- In-Reply-To
- <xmqqfwbzslt2.fsf@junio.mtv.corp.google.com>
Excerpts from Junio C Hamano's message of Thu Apr 19 12:55:53 -0400 2012:
> Is it really the character class, or is it the GNUism "\+", that breaks > this?
Yes, you're right, it is the \+. I didn't look carefully enough when I saw that test_cmp looked like the way to fix this.
I'll re-word the patch...
> In other words, does it work if you patch it like this instead?
Show 5 quoted lines
> - grep "^master[ ]\+master$" < out && > - ! grep -v "^master[ ]\+master$" < out > + grep "^master[ ][ ]*master$" <out && > + ! grep -v "^master[ ][ ]*master$" <out > '
This does work and if there is some significance to the space or tab then it's a better patch.
Thanks -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302