W
W
waltaki2019-10-06 16:36:02
linux
waltaki, 2019-10-06 16:36:02

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

2 answer(s)
R
Ruslan Fedoseev, 2019-10-06
@martin74ua

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....

N
Nomad, 2019-10-06
@I2etr0

Not sure what it is, but look here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question