[gradsusr] get output from shell command
Arlindo da Silva
dasilva at alum.mit.edu
Thu Mar 17 20:40:34 EDT 2011
On Thu, Mar 17, 2011 at 5:20 AM, Becker, Bernd <
bernd.becker at metoffice.gov.uk> wrote:
>
>
> Chuck,
> nice solution,
> but if you have 17 grads shells running in parallel, eventually
> one of them may overwrite sysdate.dat and that would be bad.
>
>
If you are using an opengrads release you can use the environment expansion
capability, and the the process ID variable $$, to create unique (per grads
instance) temporay files. For this particular example, try:
'@ !date > sysdate.dat.$$'
filename = subwrd(result,3)
d = read(filename)
d1 = sublin(d,2)
say d1
The Env extension adds a lot of convenient environment variable
functionality to GrADS. See this for more information:
http://opengrads.org/doc/udxt/env/
Arlindo
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110317/643e59c6/attachment-0003.html
More information about the gradsusr
mailing list