about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-02-26 16:57:23 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-02-26 16:57:23 +0100
commit4b9e7f5952c8ecd9e1c10eb8559f69dafb7ad86a (patch)
tree8b34c4337b3d16bbaf4269d955e323d158b1b6e3
parentc12fd15d3f6150b453a32732764e229a7eb006c7 (diff)
downloadmblaze-4b9e7f5952c8ecd9e1c10eb8559f69dafb7ad86a.tar.gz
mblaze-4b9e7f5952c8ecd9e1c10eb8559f69dafb7ad86a.tar.xz
mblaze-4b9e7f5952c8ecd9e1c10eb8559f69dafb7ad86a.zip
mcom: put newline in a variable
-rwxr-xr-xmcom12
1 files changed, 6 insertions, 6 deletions
diff --git a/mcom b/mcom
index 5466896..abd0a76 100755
--- a/mcom
+++ b/mcom
@@ -1,6 +1,9 @@
 #!/bin/sh
 # mcom [TO] - compose mail
 
+NL='
+'
+
 commajoin() {
 	awk 'NR==1 {l=$0; next}
 	     {l=l", "$0}
@@ -47,8 +50,7 @@ needs_multipart() {
 do_mime() {
 	if needs_multipart "$draft"; then
 		(
-			IFS='
-'
+			IFS=$NL
 			msed '/attach/d' $draft
 			for f in $(mhdr -M -h attach $draft); do
 				printf '#%s %s\n' \
@@ -137,8 +139,7 @@ fi
 			mseq -r "$@" | sed 's:^:#message/rfc822#inline :; s:$:>:'
 		else (
 			SEP=-----
-			IFS='
-'
+			IFS=$NL
 			for f in $(mseq -r "$@"); do
 				printf '%s Forwarded message from %s %s\n\n' \
 				       $SEP "$(mhdr -d -h from "$f")" $SEP
@@ -156,8 +157,7 @@ fi
 		msgid | sed 's/^/Resent-/'
 		printf 'Resent-Date: %s\n' "$(mdate)"
 		(
-			IFS='
-'
+			IFS=$NL
 			cat $(mseq "${@:-.}")
 		)
 		;;