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:33:44 +0100

Hi Andreas,

> 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'?

Like this?

Index: quilt/mail.in
===================================================================
RCS file: /cvsroot/quilt/quilt/quilt/mail.in,v
retrieving revision 1.16
diff -u -r1.16 mail.in
--- quilt/mail.in       30 Jan 2006 16:44:19 -0000      1.16
+++ quilt/mail.in       30 Jan 2006 22:30:36 -0000
@@ -421,13 +421,15 @@
        p=${subject_prefix//@num@/$(printf %0*d ${#total} $num)}
        p=${p//@total@/$total}
        (       echo "Message-Id: <$(msgid)>"
-               sed -e 's/^Message-Id:/References:/' \
-                   -e '/^$/Q' \
+               sed -n -e '/^$/q' \
+                   -e 's/^Message-Id:/References:/' \
+                   -e p \
                    $introduction
                echo "Content-Disposition: inline; filename=$patch"
-               sed -e '/^Recipient-.*:/d' \
+               sed -n -e '/^$/q' \
+                   -e '/^Recipient-.*:/d' \
                    -e '/^Replace-.*:/d' \
-                   -e '/^$/Q' \
+                   -e p \
                    $body
                awk '
                /^$/    { in_body = 1 }

> > $ set -e '/^$/{d;q}' < test.txt
> 
> sed instead of set would have worked here.

Oops, stupid typo, sorry. But even with sed properly spelled, it
doesn't work for me:

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

I can't explain it though.

Thanks,
-- 
Jean Delvare




reply via email to

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