Den 2021-07-04 kl. 21:50 skrev Valtteri Vuorikoski:
> sh: 1: Bad substitution
> neatroff: failed to open </tmp/tmpl-ul.tr-head.tr>
> rm: cannot remove '/tmp/tmpl-ul.tr-head.tr': No such file or directory
>
> This is caused by this line in uh.tmac:
>
> . sy str="\\$2" && echo ".ds head-str ${str: -1}" >
> /tmp/\\*[data-file]-head.tr
It seems Bash accepts ${str: -1}, while (most? many? some?)
implementations of sh don't. I tried FreeBSD's /bin/sh and it failed
with a bad substitution error too.
The compatible syntax is ${str:-1}.