Duplicate output of a program [duplicate]

Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
This question already has an answer here:
Redirect script output to /dev/tty1 and also capture output to file
2 answers
Sometimes you want to have the output in a special file. So you can do something like this:
ls > test.txt
But sometimes I want to have the output also on my command line, for example when the program takes additional input and you want to see what the program wants you to input.
How this can be done?
linux
marked as duplicate by Jeff Schaller, Archemar, Kiwy, Christopher, Hauke Laging Apr 4 at 18:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
2
down vote
favorite
This question already has an answer here:
Redirect script output to /dev/tty1 and also capture output to file
2 answers
Sometimes you want to have the output in a special file. So you can do something like this:
ls > test.txt
But sometimes I want to have the output also on my command line, for example when the program takes additional input and you want to see what the program wants you to input.
How this can be done?
linux
marked as duplicate by Jeff Schaller, Archemar, Kiwy, Christopher, Hauke Laging Apr 4 at 18:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You could have used Google
â Debian_yadav
Mar 25 at 10:41
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This question already has an answer here:
Redirect script output to /dev/tty1 and also capture output to file
2 answers
Sometimes you want to have the output in a special file. So you can do something like this:
ls > test.txt
But sometimes I want to have the output also on my command line, for example when the program takes additional input and you want to see what the program wants you to input.
How this can be done?
linux
This question already has an answer here:
Redirect script output to /dev/tty1 and also capture output to file
2 answers
Sometimes you want to have the output in a special file. So you can do something like this:
ls > test.txt
But sometimes I want to have the output also on my command line, for example when the program takes additional input and you want to see what the program wants you to input.
How this can be done?
This question already has an answer here:
Redirect script output to /dev/tty1 and also capture output to file
2 answers
linux
asked Mar 24 at 20:07
Henry Weinert
1163
1163
marked as duplicate by Jeff Schaller, Archemar, Kiwy, Christopher, Hauke Laging Apr 4 at 18:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Jeff Schaller, Archemar, Kiwy, Christopher, Hauke Laging Apr 4 at 18:45
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You could have used Google
â Debian_yadav
Mar 25 at 10:41
add a comment |Â
You could have used Google
â Debian_yadav
Mar 25 at 10:41
You could have used Google
â Debian_yadav
Mar 25 at 10:41
You could have used Google
â Debian_yadav
Mar 25 at 10:41
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
You can do it with tee:
ls | tee test.txt
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
You can do it with tee:
ls | tee test.txt
add a comment |Â
up vote
4
down vote
accepted
You can do it with tee:
ls | tee test.txt
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
You can do it with tee:
ls | tee test.txt
You can do it with tee:
ls | tee test.txt
answered Mar 24 at 20:16
Jesse_b
10.4k22658
10.4k22658
add a comment |Â
add a comment |Â
You could have used Google
â Debian_yadav
Mar 25 at 10:41