Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Kirill A . Korinsky
On Sun, 17 Nov 2024 16:59:34 +0100, Kirill A. Korinsky 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 >

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread guenther
On Sun, 17 Nov 2024, Klemens Nanni wrote: > 17.11.2024 22:00, Klemens Nanni пишет: > > I can't say right away what the shell is supposed to do here and/or what it > > really does; looks like it expands the alias and before function > > definition. > > That's what it does: > > $ alias foo=

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread guenther
On Sun, 17 Nov 2024, Klemens Nanni wrote: > 17.11.2024 22:49, George Koehler пишет: > > On Sun, 17 Nov 2024 19:10:30 + > > Klemens Nanni wrote: > > > >> 17.11.2024 20:25, Andreas Kähäri пишет: > >>> A the final right curly brace of a compound command must be preceeded by > >>> a command termi

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Jeremie Courreges-Anglas
On Sun, Nov 17, 2024 at 04:59:34PM +0100, Kirill A. Korinsky 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 >

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Kirill A . Korinsky
On Sun, 17 Nov 2024 18:25:47 +0100, Andreas Kähäri wrote: > > A the final right curly brace of a compound command must be preceeded by > a command terminator, most commonly a newline or a semi-colon. This is > what causes the syntax error in the script. > > An additional issue is that your logi

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Jeremie Courreges-Anglas
On Sun, Nov 17, 2024 at 06:28:34PM +0100, Andreas Kähäri wrote: > On Sun, Nov 17, 2024 at 05:52:26PM +0100, Jeremie Courreges-Anglas wrote: > > On Sun, Nov 17, 2024 at 04:59:34PM +0100, Kirill A. Korinsky wrote: > > > >Synopsis:ksh: syntax error: `(' unexpected > > > >Category:ksh >

ksh: syntax error: `(' unexpected

2024-11-17 Thread Kirill A . Korinsky
>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 catap@matebook.local:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Andreas Kähäri
On Sun, Nov 17, 2024 at 04:59:34PM +0100, Kirill A. Korinsky 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 >

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Kirill A . Korinsky
On Sun, 17 Nov 2024 17:52:26 +0100, Jeremie Courreges-Anglas wrote: > > See main.c: > /* Aliases that are builtin commands in at&t */ > "login=exec login", > > I guess a builtin would be slightly cleaner, but it means more code. > Indeed, the bug can be reproduced only when I u

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Klemens Nanni
17.11.2024 20:27, Kirill A. Korinsky пишет: > On Sun, 17 Nov 2024 17:52:26 +0100, > Jeremie Courreges-Anglas wrote: >> >> See main.c: >> /* Aliases that are builtin commands in at&t */ >>"login=exec login", >> >> I guess a builtin would be slightly cleaner, but it means more code.

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Klemens Nanni
17.11.2024 22:00, Klemens Nanni пишет: > I can't say right away what the shell is supposed to do here and/or what it > really does; looks like it expands the alias and before function definition. That's what it does: $ alias foo=bar $ foo() {} $ typeset -f foo $ t

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Klemens Nanni
17.11.2024 20:25, Andreas Kähäri пишет: > A the final right curly brace of a compound command must be preceeded by > a command terminator Not always: $ f() {} ; typeset -f f f() {} > most commonly a newline or a semi-colon. This is > what causes the syntax error in the script.

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread George Koehler
On Sun, 17 Nov 2024 19:10:30 + Klemens Nanni wrote: > 17.11.2024 20:25, Andreas Kähäri пишет: > > A the final right curly brace of a compound command must be preceeded by > > a command terminator > > Not always: > > $ f() {} ; typeset -f f > f() {} That isn't a compound command

Re: ksh: syntax error: `(' unexpected

2024-11-17 Thread Klemens Nanni
17.11.2024 22:49, George Koehler пишет: > On Sun, 17 Nov 2024 19:10:30 + > Klemens Nanni wrote: > >> 17.11.2024 20:25, Andreas Kähäri пишет: >>> A the final right curly brace of a compound command must be preceeded by >>> a command terminator >> >> Not always: >> >> $ f() {} ; typeset -f

Re: locking against myself on alpha 7.6 and -current

2024-11-17 Thread Andrew Hewus Fresh
On Sun, Nov 17, 2024 at 04:16:17PM +1000, David Gwynne wrote: > On Sat, Nov 16, 2024 at 07:36:37PM -0800, Andrew Hewus Fresh wrote: > > I finally got around to fixing my alpha, which involved replacing the > > disk. That meant I have to scp some stuff over to to it and after a bit > > of time it p