Skip to content

Commit eadb1ce

Browse files
authored
Merge pull request #1031 from CervEdin/fix-posix-head
Replace head -n-1 with POSIX-compatible sed '$d'
2 parents 55020ae + 3a36c66 commit eadb1ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎bin/mailsync‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ syncandnotify() {
7474
[ -z "$MAILSYNC_MUTE" ] &&
7575
for file in $new; do
7676
# Extract and decode subject and sender from mail.
77-
subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 |
77+
subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | sed '$d' |
7878
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' |
7979
sed 's/^Subject: //' | tr -d '\n\t')
8080
from="$(sed -n "/^From:/ s|From: *|| p" "$file" |

0 commit comments

Comments
 (0)