Hello,
I'm writing a script in the Posix shell and I was wondering if it was possible to combine shell variables together as the shell variable name. For example
COUNT=1
CLIENT$COUNT=Bob --> note: the syntax doesn't work
echo $CLIENT1=Bob
Unfortunately the syntax in this example doesn't work.
I'm sure this can be done, but I haven't scripted anything in a while and would appreciate any help.
Cheers,
Mark
I'm writing a script in the Posix shell and I was wondering if it was possible to combine shell variables together as the shell variable name. For example
COUNT=1
CLIENT$COUNT=Bob --> note: the syntax doesn't work
echo $CLIENT1=Bob
Unfortunately the syntax in this example doesn't work.
I'm sure this can be done, but I haven't scripted anything in a while and would appreciate any help.
Cheers,
Mark