Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2000 13:34:12 -0800 (PST)
From:      <keith@mail.telestream.com>
To:        Dan Nelson <dnelson@emsphone.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: silly off topic scripting question
Message-ID:  <Pine.LNX.4.10.10003141327440.31160-100000@mail.telestream.com>
In-Reply-To: <20000314144600.A97517@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Didn't work like you suggested but it sparked me to think of a way that
did. So thanks. Here is how I did it. 

for instance in $LIST
do

NEWDATA=${NAME[17]} < This is an array index that is the dynamic portion.
PREVDATA=$TOTAL
TOTAL=$PREVDATA:$NEWDATA
done

echo $TOTAL



Keith


=================================
I here by change the name
of RedHat to RedSplat.

Keith W.
At the helm <for better or worse>
=================================


On Tue, 14 Mar 2000, Dan Nelson wrote:

> In the last episode (Mar 14), keith@mail.telestream.com said:
> > How can one append a variable in BASH? Like run a loop and have the
> > results of the loop append a variable instead of just resetting the
> > variable with the new result?
> > I have the bash book and don't seem to see this discussed anywhere. 
> 
> $ newdata=hello
> $ var=test
> $ var=$var$newdata
> $ echo $var
> 
> testhello
> $
> 
> -- 
> 	Dan Nelson
> 	dnelson@emsphone.com
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10003141327440.31160-100000>