]> diplodocus.org Git - nmh/commitdiff
Added trailing newline to sed input in mhmail when processing
authorDavid Levine <levinedl@acm.org>
Sat, 2 Feb 2013 16:12:57 +0000 (10:12 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 2 Feb 2013 16:12:57 +0000 (10:12 -0600)
-headerfield argument, to squelch complain from Solaris sed.

test/mhmail/test-mhmail
uip/mhmail

index 1f21e638760e0d99805b7a6d84233f34b217a615..144a362e00e9e3b5b5f516b063746c02b239fb71 100755 (executable)
@@ -38,13 +38,9 @@ test_mhmail ()
     # Message-ID.
     #
 
-ls -l $actual >&2 # ???? temporary
-od -t a $actual | tail -n 4
-
     sed -e 's/^Date:.*/Date:/' \
         -e 's/^Resent-Date:.*/Resent-Date:/' \
         -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate
-echo after sed # ???? temporary
     rm -f "$actual"
 
     check "$actual".nodate "$1"
index 2fbedccb61f64855abd03b6c44e79e5b152a9b56..839b82a70d627baaffbbafe725774a9c946bb41d 100755 (executable)
@@ -160,7 +160,8 @@ for arg in "$@"; do
          #### It's not strictly necessary to have one space after
          #### the : that separates the header field name from the
          #### body, but do it to avoid surprising someone.
-         add=`printf %s "$arg" | sed -e 's/:/: /' -e 's/:  /: /'`
+         #### Solaris sed wants the trailing newline in its input.
+         add=`printf '%s\n' "$arg" | sed -e 's/:/: /' -e 's/:  /: /'`
          headerfieldlist="${headerfieldlist:+$headerfieldlist}$add
 "
          headerfieldarg=0