>>49
間接参照は ${!hoge} でいける

for i in "PATH" "HOMEPATH" "SHELL"; do
echo "(setenv \"$i\" \"`cygpath -amp "${!i}"`\")"
done