access to Unix environment variables from within grads scripting language
bernd.becker at METOFFICE.GOV.UK
bernd.becker at METOFFICE.GOV.UK
Tue Jul 18 12:06:16 EDT 2006
Thanks a mint.
Back to doddle than.
Cheers!
On Tue, 2006-07-18 at 16:57, Diane Stokes wrote:
> My mistake. It only looked like it was working. ...Sloppy on my part.
>
> From: http://grads.iges.org/grads/gadoc/gradcomdshell.html
>
> "If the shell command is executed from a Grads script, the output will
> not [be] returned as a string buffer to the script."
>
> Sorry to get your hopes up.
> Diane
>
>
>
> bernd.becker at METOFFICE.GOV.UK wrote:
> > But Diane,
> >
> > '!echo $base'
> > base=result
> > say base
> >
> > does not yield the anticipated result.
> > Bernd
> >
> >
> >
> > 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
> >
>
> --
> 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