Re: Create variable named variable$i in for loop
greyfell_at_zerobyte.org
Date: 09/25/03
- Next message: jeemthenet: "Re: ksh'93 user defined builtin exit-code anomaly"
- Previous message: Monkey Boy: "Re: sh script, grep + trigger"
- In reply to: Barry Margolin: "Re: Create variable named variable$i in for loop"
- Next in thread: Ed Morton: "Re: Create variable named variable$i in for loop"
- Reply: Ed Morton: "Re: Create variable named variable$i in for loop"
- Reply: Barry Margolin: "Re: Create variable named variable$i in for loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Sep 2003 21:06:29 -0500
Forgive me, but shellscripts are rather new to me. I can
create and manipulate arrays in C++ and Java, but I wouldn't know
where to begin to do it with a shellscript. Is it even remotely
similar?
On Wed, 24 Sep 2003 23:10:12 GMT, Barry Margolin
<barry.margolin@level3.com> wrote:
>In article <j464nvo9suecu03qs2o76b2ps8t9he4h0b@4ax.com>,
> <greyfell@zerobyte.org> wrote:
>> I'm obviously missing something. I have written a simple
>>shellscript that performs a number of tests in a for loop. In each
>>instance, I would like to log a count of how many successes the test
>>encountered to then echo at the end. I'm doing it this way:
>
>This is what arrays are for.
>
>But if you really want to do what you tried to write, use "eval":
>
>eval sucess$i=$success
- Next message: jeemthenet: "Re: ksh'93 user defined builtin exit-code anomaly"
- Previous message: Monkey Boy: "Re: sh script, grep + trigger"
- In reply to: Barry Margolin: "Re: Create variable named variable$i in for loop"
- Next in thread: Ed Morton: "Re: Create variable named variable$i in for loop"
- Reply: Ed Morton: "Re: Create variable named variable$i in for loop"
- Reply: Barry Margolin: "Re: Create variable named variable$i in for loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]