Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: array not working



zzapper <david@xxxxxxxxxx> wrote in
news:Xns98877CBF8A380zzappergmailcom@xxxxxxxxxxx: 

> Hi a previously working zsh script
> 
> #!/bin/zsh
> echo $SHELL
> dirbackup="c:/backup/mysql/"
> mysqldump="/c/mysql41/bin/mysqldump"
> param="--add-drop-table "
> server="www.someurl.co.uk"
> someurl=(database login password filename)
> 
> "$mysqldump" $param -h $server -u${someurl[1]} -p$someurl[2] -B
> ${someurl [0]} > ${someurl[3]}.sql
> 
> What is happening is that ${someurl[1]} $someurl[2] ${someurl[0]}
> 
> are all evaulating to the same value (first element in array)
> 
> zsh 4.3.2 (i686-pc-cygwin)
> 
> what daft thing am i doing?
> 
> 
Hi
Started new shell and problem went away, but arrays now seem to be
indexed from 1 rather than zero?? 

Did this change recently?


-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips



Messages sorted by: Reverse Date, Date, Thread, Author