The GNU-specific head -n-1 syntax causes errors on macOS/BSD systems.
Replaced with sed '$d' which is POSIX-compatible and achieves the same
result of removing the last line.
On my system running any `mw` command after a fresh install from the AUR, I get:
```
/usr/bin/mw: line 37: [: 1.5: unary operator expected
```
Now the script doesn't error per-se but it does set the `master` and `slave`
variables to wrong values. I'm also not sure how this wasn't raised before;
maybe that's a new bash version thing? I'm on 5.2.37.
Anyway I faffed around trying to fix this, in particular with the `-gt` operator
but it turned out that properly comparing float numbers is a pain in the butt in
bash. I found solutions using `bc` which I thought were weird.
To keep things simple I ended up doing a little substitution on the dot `.`
character and turned these nasty floats into integers, along with using the
`-gt` operator which did the trick on my system. May be unorthodox so feedback
is more than welcome.
Thank you for the great software by the way, lots of gratitude for your work.
Fixes text being interpreted as flags when it starts with a dash.
Try sending yourself a letter with subject starting with '-'.
E.g. if subject is '-10%' fixes error:
> Unknown option -10%
* OS variable was unused
* ifndef section is not needed since
"make PREFIX=... MANPREFIX=..." overwrites
whatever is set there
* notdir is a GNU specific function (not POSIX) and doesn't do
anything in this case
* "sed -i" is not POSIX and pointless if pipes are used correctly
* the "if" block can be removed since "sed" can also be used to
copy files to the destination.
`+` was properly escaped but only once. `$` was not escaped at all.
This would result in messages with message IDs containing more than one
`+` or at least on `$` to not be shown after limiting.
`$` itself has to be escaped presumably for the shell. This results in
three prepended backslashes in the limit string and six in the config
file, as there backslashes themselves have to be escaped.