[gradsusr] say to stderr
Simon Kiertscher
simon.kiertscher at gmx.de
Mon Jul 25 08:27:59 EDT 2011
-----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-----
More information about the gradsusr
mailing list