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: Andreas Gruenbacher
Subject: Re: [Quilt-dev] quilt mail broken with sed 3.02
Date: Mon, 30 Jan 2006 23:24:54 +0100
User-agent: KMail/1.8

On Monday 30 January 2006 23:08, Jean Delvare wrote:
> 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'
> $

Ah, I've overlooked the -n. So that version is correct, too. Options are 
global though, so please don't put -n in the middle of some expressions. 
Also, could you please split up -e '/^$/q;p' into -e '/^$/q' and -e 'p'?

> $ set -e '/^$/{d;q}' < test.txt

sed instead of set would have worked here.

Thanks,
Andreas.




reply via email to

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