quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] quilt mail broken with sed 3.02


From: Jean Delvare
Subject: Re: [Quilt-dev] quilt mail broken with sed 3.02
Date: Mon, 30 Jan 2006 23:08:53 +0100

Hi Andreas,

[Jean Delvare]
> > -               -e '/^$/Q' \
> > +               -ne '/^$/q;p' \

[Andreas Grünbacher]
> Objection. You git the semantics wrong:
> 
>       $ echo 'a' | sed -e '/a/Q'
>       $ echo 'a' | sed -e '/a/p;q'
>       > a
>       > a

But:

$ echo 'a' | sed -ne '/a/q;p'
$

Which is what I was trying to do, and it seems to work. The test suite
still passes, at the very least.

> This should do the job though (don't leave out the {} grouping):
> 
> -      -ne '/^$/Q'
> +      -ne '/^$/{d;q}'

Doesn't work at all in my tests (even with -e instead of -ne, which is
what you really meant I guess.) See by yourself:

$ cat test.txt 
alpha
beta

gamma
delta
$ sed -e '/^$/Q' < test.txt 
alpha
beta
$ sed -ne '/^$/q;p' < test.txt 
alpha
beta
$ set -e '/^$/{d;q}' < test.txt
$

Thanks,
-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]