What you are looking for is the tee command:
ls -a | tee output.file
If you want to include the error output too (stderr):
your_command [arguments...] 2 >&1 | tee output.file
Author: Lucas Vieites ✦ Published: ✦ Updated: ✦
What you are looking for is the tee command:
ls -a | tee output.file
If you want to include the error output too (stderr):
your_command [arguments...] 2 >&1 | tee output.file
Author: Lucas Vieites ✦ Published: ✦ Updated: ✦