Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
variable assignment in a script using globsubst
- X-seq: zsh-users 8861
- From: Vincent Stemen <zsh@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: variable assignment in a script using globsubst
- Date: Tue, 17 May 2005 23:43:55 -0500
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Any idea why this works from the command line,
$ setopt globsubst
$ files=/bin/c*; echo $files
/bin/cat /bin/chflags /bin/chio /bin/chmod /bin/cp /bin/csh
but in a script, it does not?
# --<script>--
setopt globsubst
files=/etc/c*
echo "$files"
# --</script>--
Output of the script:
/etc/c*
I got the same result on both Linux and BSD.
The script works if I set globassign in the script, but it assigns it
as an array rather than a string. However, the manual says, this
about globassign.
"This option is provided for backwards compatibility only"
Am I overlooking some other option that could be affecting it?
--
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
Read how Network Solutions (NSI) was involved in stealing our domain name.
http://inetaddresses.net/about_NSI.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author