diff options
author | Erich Eckner <git@eckner.net> | 2019-10-10 10:16:18 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-10-10 10:16:18 +0200 |
commit | 8feae882e53e453bc7e8a290a66c4ebcb984e501 (patch) | |
tree | e78434a63be35dd324d030ee73faddd6b1c5e362 | |
parent | e7e4f9c576041ed21efca1febd2d25f2bce8557c (diff) | |
download | sendmailadvanced-8feae882e53e453bc7e8a290a66c4ebcb984e501.tar.xz |
sendmailadvanced.in: auto-insert spacing lines for headers/footers (will mangle successing linebreaks in header-/footer-output, too)
-rwxr-xr-x | sendmailadvanced.in | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sendmailadvanced.in b/sendmailadvanced.in index 5e5a58e..b3433b4 100755 --- a/sendmailadvanced.in +++ b/sendmailadvanced.in @@ -228,11 +228,29 @@ fi ( for hookParam in "${hooks[@]}"; do "#ETCDIR#/sendmailadvanced.hooks/${hookParam}" head - done + echo + done \ + | sed ' + /^$/ { + :a + N + s@^\n$@@ + ta + } + ' cat for hookParam in "${hooks[@]}"; do "#ETCDIR#/sendmailadvanced.hooks/${hookParam}" foot - done + echo + done \ + | sed ' + /^$/ { + :a + N + s@^\n$@@ + ta + } + ' ) | \ if ${encrypt}; then ( |