Closed nmeum closed 7 years ago
Probably a bug in busybox, but this fix works.
I guess even better would be sed -n '/^-- $/q;p'
That works as well, but this expression should be semantically equivalent to the one suggested by me. Mine specifies two addresses (beginning of signature separator and end of input) and prints the lines that are not in between those two while your expression prints everything until the first signature separator.
It's more efficient on really long footers. ;)
Not sure if compatibility with non-GNU sed version is a goal of this project but you seem to have fixed non-POSIX sed usage in the past. Therefore I wanted to inform you that mquote doesn't work with busybox sed because the sed expression to strip the signature seems to strip all lines except the first one with busybox sed. For example:
I am not a sed magician myself but I came up with a solution that seems to work with busybox sed as well. Not sure if it is ideal though...