[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] add and expand
From: |
Peter West |
Subject: |
Re: [Help-bash] add and expand |
Date: |
Tue, 6 Jun 2017 09:26:11 +1000 |
> On 6 Jun 2017, at 8:00 am, Val Krem <address@hidden> wrote:
>
> Hi all,
>
> I have an array and i want list the array elements with prefix. In this case
> my prefix is "Number"
>
>
> #! /bash/bin
>
> List=“one two three”
I don’t think List is an array.
List=(one two three)
is an array.
>
> my desired out put should be
> "Numberone, Numbertwo, Numberthree"
>
>
> I tried
>
> echo address@hidden and echo ${Name[@/#/Number]}
> did not work.
List=(one two three)
for n in address@hidden; do echo “Number$n”; done
(except with ascii double quote)
This works for me.
--
Peter West
address@hidden
This is the disciple who is bearing witness to these things…
signature.asc
Description: Message signed with OpenPGP
- [Help-bash] add and expand, Val Krem, 2017/06/05
- Re: [Help-bash] add and expand,
Peter West <=
- Re: [Help-bash] add and expand, Val Krem, 2017/06/05
- Re: [Help-bash] add and expand, Peter West, 2017/06/05
- Re: [Help-bash] add and expand, Greg Wooledge, 2017/06/06
- Re: [Help-bash] add and expand, Val Krem, 2017/06/06
- Re: [Help-bash] add and expand, Greg Wooledge, 2017/06/06
- Re: [Help-bash] add and expand, Val Krem, 2017/06/07
- Re: [Help-bash] add and expand, Dennis Williamson, 2017/06/07
- Re: [Help-bash] add and expand, Greg Wooledge, 2017/06/08
- Re: [Help-bash] add and expand, Dennis Williamson, 2017/06/08
- Re: [Help-bash] add and expand, Greg Wooledge, 2017/06/08