You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Xavier Vigouroux <Xa...@Sun.COM> on 2005/11/16 14:53:38 UTC
ij stdout and stderr
Hi,
I am using ij in a script. In some case the script is not executed
correctly (transient PriviledgeException). I would like at least warn
user about the problem.
but, as far as i see, ERROR are printed on stderr instead of stdout.
Do i need to make a grep "ERROR" or is there another solution?
thanks
--
Xavier VIGOUROUX - sun microsystems
Re: ij stdout and stderr
Posted by Xavier Vigouroux <Xa...@Sun.COM>.
Le 16 nov. 05, à 22:52, Jean T. Anderson a écrit :
> Xavier Vigouroux wrote:
>> Hi,
>> I am using ij in a script. In some case the script is not executed
>> correctly (transient PriviledgeException). I would like at least warn
>> user about the problem.
>> but, as far as i see, ERROR are printed on stderr instead of stdout.
>> Do i need to make a grep "ERROR" or is there another solution?
>> thanks
>
> When I run scripts on UNIX I typically run them like this to capture
> stderr in the output logfile:
>
the problem is the other way....both streams are merged (there is no
stderr)....
So I had to "grep" the stdout to extract errors and then redirect it to
stderr
> c shell:
> my_script_file >& file.log
>
> bourne shell:
> my_script_file > file.log 2>&1
>
> does this help?
>
> -jean
>
--
Xavier VIGOUROUX - sun microsystems
Re: ij stdout and stderr
Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
Xavier Vigouroux wrote:
> Hi,
>
> I am using ij in a script. In some case the script is not executed
> correctly (transient PriviledgeException). I would like at least warn
> user about the problem.
> but, as far as i see, ERROR are printed on stderr instead of stdout.
>
> Do i need to make a grep "ERROR" or is there another solution?
>
> thanks
>
When I run scripts on UNIX I typically run them like this to capture
stderr in the output logfile:
c shell:
my_script_file >& file.log
bourne shell:
my_script_file > file.log 2>&1
does this help?
-jean