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? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -