Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Array as parameter
- X-seq: zsh-users 16551
- From: meino.cramer@xxxxxx
- To: zsh-users@xxxxxxx
- Subject: Array as parameter
- Date: Wed, 2 Nov 2011 04:35:45 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
how can I use an array as a parameter to a function like
this (example does not work...just as an explanation, what
I want to do)
#! /bin/zsh
funcion arrprint()
{
for i in $1
do
echo $i
echo "---"
done
}
a=( 1 2 3 4 5 6 )
arrprint a
when executed shoult print
1
---
2
---
3
---
4
---
5
---
6
---
Thank you very mich in advance for any help!
Best regards,
mcc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author