Answer the question
In order to leave comments, you need to log in
Linux - how to redirect input and output to a file?
Hello.
There is a java program, I need to run it and log its output to a file, and transfer the input from the console to the program, and log it in the same way.
As for the output, everything is clear 'java pia.jar >> pia.log', but I can't figure out how to direct input from the console both to the file and to the program itself.
Tell me please
Answer the question
In order to leave comments, you need to log in
cat file | prg > log.txt
prg < file > log.txt
prg < file | tee log.txt
pick up...
Shl. And what, they hid a certificate from you? scoundrels....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question