trying to redirect both std out and err to a file together and still err to a separate file

Q

qwertmonkey

Lew you are right the thread started on comp.unix.shell. It does however
related to java.
~
The thing is that sometimes I would (within java) redirect out and/or err
to files but sometimes I need for out and err to log to the same file and err
still to a different/separate one. I haven't figured out how to do that
cleanly/easily in java.
~
The shell, however, seems to come handy in such cases. In fact as I found out,
things aren't that simple on the shell either (comp.unix.shell: Lem Novantotto ...),
so it is best if those guys sort it out themselves
~
lbrtchx
comp.lang.java.programmer: trying to redirect both std out and err to a file
together and still err to a separate file
 
R

Roedy Green

Lew you are right the thread started on comp.unix.shell. It does however
related to java

If you do it with a shell, you potentially need a different script for
each platform. If you do it inside the Java program, it works
everywhere. However, it is usually easier to modify a shell than a
Java program.

see System.setErr System.setOut
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top