Re: [PATCH v4 08/11] connect: change the --diag-url output to separate user and host

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

 



On Tue, May 3, 2016 at 12:20 PM, Torsten Bögershausen <tboegi@xxxxxx> wrote:
> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]