-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2260
Joachim Ansorg edited this page Nov 12, 2021
·
2 revisions
env > environment.txt | grep '^ANDROID'
env | tee environment.txt | grep '^ANDROID'
A process only has a single standard output stream. Pipes and output redirections both overwrite it, so you can't use both at the same time. If you try, the redirection takes precedence and the output pipe is closed.
If you want to dump output to a file while also piping it, use tee
as in the example.
None.
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!