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.


_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to