I have the following script in tcsh:
#!/usr/bin/tcsh -f
set groups = (one two three four)
foreach group ($groups)
set go = "go_$group"
eval "set val = $go"
if ( $?val ) then
echo "val is: $$val"
endif
end
the output I’m getting is not the output I want. I’m getting:
val is: 7553go_one
val is: 7553go_two
val is: 7553go_three
val is: 7553go_four
I understand that 7553 is the pid…
How can I get the value of each variable go_one, go_two…?
Thanks!
1