Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • The simplest solution would be to wrap it up in a shell script (like run) that would call the quoted command you want to run. Then you'd run 'find . -type f' and the script would execute find . -type f | tee $lastOutLocation. Note that I used quotes to allow multiple commands as you mentioned. Commented Jan 13, 2017 at 17:36
  • 2
    consider the typescript (script) command Commented Jan 13, 2017 at 17:38
  • The biggest hurdle would be programs that want access to the terminal and not just to write to stdout. Piping to tee (or anything else) wouldn't be compatible with this. Commented Jan 14, 2017 at 15:28