[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expand existing file system entries in one declare
From: |
Greg Wooledge |
Subject: |
Re: expand existing file system entries in one declare |
Date: |
Sat, 4 Mar 2023 11:21:21 -0500 |
On Sat, Mar 04, 2023 at 11:02:56AM +0100, alex xmb ratchev wrote:
> in array= (
> @(){<list,list>}
> ) # the entries are @Q escaped
That isn't the correct syntax for an extended glob which expands to
either of two patterns. You want this instead:
array=(
@(list|list)
)
> ) # the entries are @Q escaped
What does that mean?
> i couldnt make ${*:2@Q} work
What is that even trying to do? Create a new pseudo-list encased in a
string which can be used by 'eval'? If so... WHY?!
If you just want "all except the first", it would be so much clearner to
store them in an array:
therest=( "${@:2}" )
Or, simply use "shift" if you no longer need "$1" any longer.