help-bash
[Top][All Lists]
Advanced

[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…

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]