Changes between Version 12 and Version 13 of TipAndDoc/console


Ignore:
Timestamp:
Apr 20, 2011 11:08:15 PM (13 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/console

    v12 v13  
    11[[PageOutline]] 
     2 
     3 * [http://serverfault.com/questions/63705/how-to-pipe-stderr-without-piping-stdout unix - How to pipe stderr without piping stdout - Server Fault] 
     4 > To do that, use one extra file descriptor to switch stderr and stdout: 
     5 > {{{ 
     6 > find /var/log 3>&1 1>&2 2>&3 | tee foo.file 
     7 > }}} 
     8  * stdoutをファイルにリダイレクトしつつ、stderrをpipe処理したいときは以下のようにする (bash) 
     9   * ls -la /var/tmp /var/tmp/hoge 2> stdout 3>&1 1>&2 2>&3 | wc; echo -----; cat stdout 
     10{{{ 
     11      1       7      45 
     12----- 
     13/var/tmp: 
     14total 16 
     15drwxrwxrwt  2 root root 4096 Apr 20 04:42 . 
     16drwxr-xr-x 28 root root 4096 May 17  2010 .. 
     17}}} 
    218 
    319 = screen =