[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}.
- utmac -muh error on Ubuntu, Valtteri Vuorikoski, 2021/07/04
- Re: utmac -muh error on Ubuntu,
John Ankarström <=
- Re: utmac -muh error on Ubuntu, Tadziu Hoffmann, 2021/07/05
- Re: utmac -muh error on Ubuntu, John Ankarström, 2021/07/06
- Re: utmac -muh error on Ubuntu, John Ankarström, 2021/07/06
- Re: utmac -muh error on Ubuntu, Valtteri Vuorikoski, 2021/07/07
- Re: utmac -muh error on Ubuntu, John Ankarström, 2021/07/07
- Re: utmac -muh error on Ubuntu, address@hidden, 2021/07/09