access to Unix environment variables from within grads scripting language

bernd.becker at METOFFICE.GOV.UK bernd.becker at METOFFICE.GOV.UK
Fri Jun 23 10:23:33 EDT 2006


Excellent!

thanks Diane.

On Fri, 2006-06-23 at 15:14, Diane Stokes wrote:
> The following works for me:
>
> '!echo $base'
> say result
>
>
>     Diane
>
>
> bernd.becker at METOFFICE.GOV.UK wrote:
> > Hello!
> >
> > I would like to access System environment variables
> > during run time of a grads script.
> > The following function doddle allows me to do that,
> > but it doesn't look nice.
> >
> > How can I make the following code much slicker?
> > Regards,
> > Bernd.
> >
> > function doddle ()
> > '!echo $base >./erp1'
> > record2=read(erp1)
> > result=sublin(record2,2)
> > rc=close(erp1)
> > say result
> > quit
> > return
> > --
> > Bernd Becker   The Monthly Outlook
> > Met Office  FitzRoy Road  Exeter   Devon EX1 3PB  United Kingdom
> > Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
> > E-mail:bernd.becker at metoffice.gov.uk -  http://www.metoffice.gov.uk
> >
>
> --
> Diane Stokes
> Environmental Modeling Center
> National Weather Service/NOAA
--
Bernd Becker   The Monthly Outlook
Met Office  FitzRoy Road  Exeter   Devon EX1 3PB  United Kingdom
Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
E-mail:bernd.becker at metoffice.gov.uk -  http://www.metoffice.gov.uk



More information about the gradsusr mailing list