LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   IO redirection not working (https://www.linuxquestions.org/questions/linux-newbie-8/io-redirection-not-working-112334/)

ministre 11-04-2003 01:21 PM

IO redirection not working
 
Hello,

I am using bash as my shell.
I am compiling some java files and I will like to redirect the compile errors that I get to some text file.
So I issue the following command

javac myjavafile.java > debug

Nothing is written in the debug file and all the errors are displayed on the screen.
I did check the permission on the file debug to make sure I have the correct permission
I also try to pipe the output to more

javac myjavafile.java | more

again, everything is written to the screen and I cannot scroll up and down with more.

Does anyone have any idea of what is going wrong here ?

Thanks

unSpawn 11-04-2003 01:41 PM

Stderr is channel &2: "javac myjavafile.java 2> debug". Combining this, if you want and stdout and stderr in one log and be able to scroll tru it all, try "javac myjavafile.java 2>&1 | tee debug | less"

Lostman 11-04-2003 01:50 PM

Don't you have to put the a file extension on it?

avac myjavafile.java > debug.txt

???


All times are GMT -5. The time now is 03:08 PM.