Re: [PATCH v4 08/11] connect: change the --diag-url output to separate user and host
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 3, 2016, 17:23 UTC
- Message-ID
- <CAPig+cTYjY7=8YqGy_4dNKK7JWinShjTR-nEMY2V6gudzS2Bgw@mail.gmail.com>
- In-Reply-To
- <c1cc0220-d239-1589-9957-1ef8a6245d54@web.de>
On Tue, May 3, 2016 at 12:20 PM, Torsten Bögershausen <tboegi@web.de> wrote:
Show 11 quoted lines
> On 2016-05-03 10.50, Mike Hommey wrote: >> - git fetch-pack --diag-url "$1" | grep -v host= | grep -v port= >actual && >> + git fetch-pack --diag-url "$1" | grep -v user= | grep -v host= | grep -v port= >actual && > Running grep a couple of times is probably not optimal in terms of spawning a > process.... > Does > > git fetch-pack --diag-url "$1" | egrep -v "user=|host=|port=" >actual && > work ? > or the version like this: > git fetch-pack --diag-url "$1" | egrep -v "(user|host|port)=" >actual &&
I always worry about portability problems with these "advanced" expressions in grep and sed, however, both of these work fine under Mac OS X and FreeBSD (which is where problems often manifest).
An alterante expression which shouldn't raise any portability alarms would be:
sed -e /user=/d -e /host=/d -e /port=/d