Print and divert output?

If none of the more specific forums is the right place to ask

Print and divert output?

Postby Munty Scruntfundle » 2019-02-09 16:38

I know how to send output from a command to a new file, but is there a way to do this while still sending output to the screen?

Thanks.
Munty Scruntfundle
 
Posts: 17
Joined: 2018-11-27 16:53

Re: Print and divert output?

Postby 4D696B65 » 2019-02-09 16:45

tee
User avatar
4D696B65
 
Posts: 2242
Joined: 2009-06-28 06:09

Re: Print and divert output?

Postby shep » 2019-02-09 18:50

If you are using a shell script, you can redirect the output into a file and then 'cat' the file to stdout. Several ways to do this, web search "shell+scripts+redirect".
shep
 
Posts: 244
Joined: 2011-03-15 15:22


Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable