Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: assigning parameters and globbing
- X-seq: zsh-users 10137
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx (Zsh users list)
- Subject: Re: assigning parameters and globbing
- Date: Wed, 05 Apr 2006 08:00:56 -0700
On Apr 5, 10:24am, Peter Stephenson wrote:
}
} I'd probably use an intermediate array.
}
} local -a files
} files=(*)
} export BLAH=${files[-1]}
Also, arrays can be placed into the environment of builtin commands,
even though they can't be exported to the "permanent" environment that
is shared by external commands. So this works:
files=(*) eval 'export BLAH=$files[-1]'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author