bug-bash
[Top][All Lists]
Advanced

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

Re: select syntax violates the POLA


From: Ilkka Virta
Subject: Re: select syntax violates the POLA
Date: Sat, 3 Apr 2021 00:34:20 +0300

On Thu, Apr 1, 2021 at 7:59 PM Robert Elz <kre@munnari.oz.au> wrote:

> Alternatively
>         d=( $( ls -d /usr/src/pkg/*/$1 ) )
> or just
>         d=( $( printf %s\\n /usr/src/pkg/*/$1 ) )
>
> Just to be sure.    Personally I'd do
>
>         set -- /usr/src/pkg/*/$1
>

Just the glob is fine in the array assignment, it splits and globs the same
as in arguments to  'set':

d=( /usr/src/pkg/*/$1 )

(If there was any context that splits but doesn't glob, this isn't one)


reply via email to

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