bash - pipe here document command to log file -


quite i'll use following construct pipe output log file, keeping output on display

./command 2>&1 | tee output.log 

i'm trying similar, using here document:

./command << heredoc params heredoc 2>&1 | tee output.log 

this doesn't work - possible achieve this?

sure.

./command <<heredoc 2>&1 | tee output.log params heredoc 

the here-document doesn't begin until next line. rest of command parsed normal.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -