Hello,

I try to assign a value to a variable, but the variable should consist of 
another variable. Is this possible (in bourne shell)?

Example:

#!/bin/sh
list="one two three four"

for item in $list; do
  ${item}_present=yes
done

This doesn't work since the shell tries to execute "one_present=yes" 
instead of assigning yes to one_present....

What am I missing????

Thanks a lot,

-Harry

Attachment: pgp5OfmfXwi46.pgp
Description: PGP signature

Reply via email to