[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Passing elements to function
From: |
Eduardo A . Bustamante López |
Subject: |
Re: [Help-bash] Passing elements to function |
Date: |
Sun, 15 Oct 2017 08:35:17 -0500 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
On Sun, Oct 15, 2017 at 08:30:11AM +0300, Pierre Gaston wrote:
[...]
> Before that though, a simpler solution is to pass the elements something
> like:
>
> array2file () {
> local file elem
> file =$1
> shift
> for elem in "$@";doe
> echo "$elem"
> done >> "$file"
> }
v
Just a small correction, the space here: `file =$1' should be removed.