Re: log to multilog instead of file

Laurent Bercot <[email protected]>
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
>> exec 2>&1
>> exec 1>...
> doesn't this mean:  "stderr writes into the same channel as stdout" (two is
> dup'ed from one), and the later redirection of stdout redirects both?

 Nope, it's the opposite. :)
 You don't redirect "stdout", you redirect only fd 1. fd 2 is unchanged
by the second redirection.

 prog  --1--> "stdout"
      \--2--> "stderr"
  |
  | exec 2>&1
  V

 prog --1--\ /-> "stdout"
     \--2--/

  |
  | exec 1>foobar
  V

 prog --1--> foobar
     \--2--> "stdout"

-- 
 Ska
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.