help-bash
[Top][All Lists]
Advanced

[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 19:06:20 +0000

On Sun, 5 Mar 2023 13:49:36 +0100
alex xmb ratchev <fxmbsw7@gmail.com> wrote:

> On Sun, Mar 5, 2023, 2:27 AM Kerin Millar <kfm@plushkava.net> wrote:
> 
> > On Sat, 4 Mar 2023 15:24:42 +0100
> > alex xmb ratchev <fxmbsw7@gmail.com> 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.
> >
> 
> i see thers style that needs to be pre enabled , dunno much .. nullglob
> worked

Yes. It worked because the nullglob option does not introduce a new syntax.

-- 
Kerin Millar



reply via email to

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