2019-01-28 08:08:53 +0000, Harald van Dijk: [...] > > alias ifdebug= > > ifdebug echo DEBUG > > > > works fine in dash AFAICT. > > The non-DEBUG case is alias ifdebug=# to comment out the command. > > $ dash <<EOF > > alias ifdebug=# > > ifdebug echo DEBUG > > EOF > dash: 3: Syntax error: end of file unexpected [...]
D'oh. Sorry. It looks like the same bug. Note that it affects busybox sh and FreeBSD sh as well, so probably all ash-derived shells (unless Robert already fixed that one on NetBSD). Adding a "exit" at the end of your script works around it but not an empty or comment line. -- Stephane