[gradsusr] say to stderr

Huddleston, John Huddleston at cira.colostate.edu
Fri Jul 22 10:10:40 EDT 2011


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




More information about the gradsusr mailing list