On Wed, Oct 19, 2016 at 12:28 PM, Christof Warlich <address@hidden>
wrote:
> Hi,
> looks like I still haven’t fully gasped shell redirection:
> I want my script(s) to print stderr to the terminal, while both stdout
> _/and/_ stderr should go to a logfile. I thought that this is an easy task,
> but so far, I failed miserably.
> Any ideas how this could be done, ideally without using any temporary
> files or named pipes?
> Many thanks,
> Chris
>
>
​I've read all the replies. And tried some really strange things myself.
The closest that I can come to what you want (and it is not all that close)
is to use the "script" program to run your program.
script -c 'somecmd p1 parm2 --option' logfile.txt
Both stdout & stderr come to the terminal & get written to logfile.txt​ .
There is no way, that I know of, to put stdout into "logfile.txt" but
suppress it from the terminal.
--
Heisenberg may have been here.
Unicode: http://xkcd.com/1726/
Maranatha! <><
John McKown