Re: csh: how to use indirect ref to env vars

2008-07-07 Thread michael
On Wed, 2008-06-25 at 08:03 -0700, ss11223 wrote: On Jun 25, 9:40 am, michael [EMAIL PROTECTED] wrote: Hi, I have acshscript in which I'd like to do set up a list of vars and then to chk each of these are set, something like the below. However, I can't find the magic incantation that allows

csh: how to use indirect ref to env vars

2008-06-25 Thread michael
Hi, I have a csh script in which I'd like to do set up a list of vars and then to chk each of these are set, something like the below. However, I can't find the magic incantation that allows to to check ${$Vars} eg if $InMetFiles is set on the first loop - suggestions welcome! #!/bin/csh foreach

Re: csh: how to use indirect ref to env vars

2008-06-25 Thread Wackojacko
michael wrote: Hi, I have a csh script in which I'd like to do set up a list of vars and then to chk each of these are set, something like the below. However, I can't find the magic incantation that allows to to check ${$Vars} eg if $InMetFiles is set on the first loop - suggestions welcome!

Re: csh: how to use indirect ref to env vars

2008-06-25 Thread michael
On Wed, 2008-06-25 at 15:02 +0100, Wackojacko wrote: michael wrote: Hi, I have a csh script in which I'd like to do set up a list of vars and then to chk each of these are set, something like the below. However, I can't find the magic incantation that allows to to check ${$Vars} eg if

Re: csh: how to use indirect ref to env vars

2008-06-25 Thread ss11223
On Jun 25, 9:40 am, michael [EMAIL PROTECTED] wrote: Hi, I have acshscript in which I'd like to do set up a list of vars and then to chk each of these are set, something like the below. However, I can't find the magic incantation that allows to to check ${$Vars} eg if $InMetFiles is set on the

Re: csh: how to use indirect ref to env vars

2008-06-25 Thread michael
On Wed, 2008-06-25 at 08:03 -0700, ss11223 wrote: On Jun 25, 9:40 am, michael [EMAIL PROTECTED] wrote: Hi, I have acshscript in which I'd like to do set up a list of vars and then to chk each of these are set, something like the below. However, I can't find the magic incantation that allows

Re: csh: how to use indirect ref to env vars

2008-06-25 Thread ss11223
On Jun 25, 12:40 pm, michael [EMAIL PROTECTED] wrote: ah, I see rather than testing a variable we try and use it and catch any error... it seems to work as you say... although this seems slightly more elegant if less easy to add new VarN to: if ( $?InMetFiles == 0 || $?InTerFile == 0 {etc})