]> 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 1f21e63..144a362 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 2fbedcc..839b82a 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