groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: utmac -muh error on Ubuntu


From: John Ankarström
Subject: Re: utmac -muh error on Ubuntu
Date: Sun, 4 Jul 2021 22:22:16 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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}.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]