[Top][All Lists]

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

Re: stuck at bash unexpected token `(' error

From: Kerin Millar
Subject: Re: stuck at bash unexpected token `(' error
Date: Sun, 5 Mar 2023 01:27:38 +0000

On Sat, 4 Mar 2023 15:24:42 +0100
alex xmb ratchev <> wrote:

> actually i work arounded by setting shopt -s extglob to the top of the
> script
> but thats a work around
> when looking at the script see shopt -s and that wasnt enuff , will move up
> but .. isnt this a bug ?

It is not. Enabling extglob changes the way in which the parser works. 
Therefore, it needs to be enabled prior to bash encountering any code that 
would otherwise constitute a syntax error. It is not a feature for which 
enablement can be indefinitely postponed (at least, not in practical terms). 
The simplest approach is to enable extglob at the earliest possible 
opportunity, unconditionally.

Kerin Millar

reply via email to

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