On Sun, 17 Nov 2024 16:59:34 +0100,
Kirill A. Korinsky <[email protected]> wrote:
>
> >Synopsis: ksh: syntax error: `(' unexpected
> >Category: ksh
> >Environment:
> System : OpenBSD 7.6
> Details : OpenBSD 7.6-current (GENERIC.MP) #39: Sun Nov 17 11:27:14
> CET 2024
>
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine : amd64
> >Description:
> ksh -n complains as syntax error on legitim shell script.
> >How-To-Repeat:
> echo 'login() { login }' | ksh -n -
Here another example of wired syntax error:
~ $ cat | ksh -n -
"$("$('"')")"
ksh: <stdin>[2]: no closing quote
~ $ cat | ksh -n -
"$("$(\")")"
~ $
--
wbr, Kirill