[gradsusr] say to stderr

Davide Sacchetti davide.sacchetti at arpal.gov.it
Wed Jul 27 05:34:40 EDT 2011


inside a script you could redirect using unix shell
e.g.:
'!echo ERROR ON FILE >&2'

I've just tried and it seems to work

bye bye
Davide

On Mon, 2011-07-25 at 14:27 +0200, Simon Kiertscher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi John,
> 
> thanks you for your effort.
> 
> Best Regards,
> Simon
> 
> Am 22.07.2011 16:10, schrieb Huddleston, John:
> > Simon
> > 
> > I looked through the GrADS source code, specifically gscrpt.c file and the 'printf' function is used.
> > 
> > The 'printf' always goes to stdout.  Had it been fprintf(FILE *somefp,...) then maybe it could have been.
> > 
> > However, I don't think the original designers (aka Brian Doty) was concerned about writing to stderr.
> > 
> > John
> > 
> > -----Original Message-----
> > From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Simon Kiertscher
> > Sent: Friday, July 22, 2011 2:25 AM
> > To: gradsusr at gradsusr.org
> > Subject: Re: [gradsusr] say to stderr
> > 
> > Hi John,
> > 
> > thanks for your answer. I know how to redirect channels on the command line.
> > But how to decide IN the script, what should go to stderr and what to stdout, 'say' always put the output to stdout.
> > So in bash i would do echo "foobar" 1>&2 to get the foobar to the stderr, how can i do this in GrADS? Is there a way?
> > 
> > Best Regards,
> > Simon
> >> Simon
> >>
> >> If you are running GrADS in batch mode you can re-direct output as 
> >> follows
> >>
> >> grads -lbc 'run somescript.gs' 2>  say.err 1>&2
> >>
> >> In interactive mode there is no output to the screen it simply goes to the file.
> >>
> >> Does that answer your question?
> >>
> >> John Huddleston
> >>
> >> -----Original Message-----
> >> From: gradsusr-bounces at gradsusr.org 
> >> [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Simon Kiertscher
> >> Sent: Wednesday, July 20, 2011 7:36 AM
> >> To: gradsusr at gradsusr.org
> >> Subject: [gradsusr] say to stderr
> >>
> >> Dear gradsusers
> >>
> >> i can not find any information about sending text to the stderror channel of the shell while using the say command. Has some one an idea?
> >>
> >> Best Regards,
> >> Simon
> >> _______________________________________________
> >> gradsusr mailing list
> >> gradsusr at gradsusr.org
> >> http://gradsusr.org/mailman/listinfo/gradsusr
> >>
> >> _______________________________________________
> >> gradsusr mailing list
> >> gradsusr at gradsusr.org
> >> http://gradsusr.org/mailman/listinfo/gradsusr
> >>
> > 
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> > 
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> > 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> 
> iEYEARECAAYFAk4tYU8ACgkQG0AVdCSrH+YQTwCguP5vZwnTglV57tNoXdBLQHfr
> Z8EAnizKje0vZYEoHntzY/0Omx67IPSf
> =Y7CV
> -----END PGP SIGNATURE-----
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 

-- 
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535                    fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it     web: www.meteoliguria.it





More information about the gradsusr mailing list