/usr/bin/bash: Difference between revisions

Line 966: Line 966:


=== Moving File Descriptors ===
=== Moving File Descriptors ===
      The redirection operator
リダイレクト演算子


              [n]<&digit-
<code>[n]<&digit-</code>


      moves  the  file descriptor digit to file descriptor n, or the standard input (file descriptor 0)
は、ファイル記述子digitをファイル記述子n、またはnが指定されない場合は標準入力(ファイル記述子0)に移動する。digitはnに複製された後、クローズされる。
      if n is not specified.  digit is closed after being duplicated to n.


      Similarly, the redirection operator
同様に、リダイレクト演算子


              [n]>&digit-
<code>[n]>&digit-</code>


      moves the file descriptor digit to file descriptor n, or the standard output (file descriptor  1)
は、ファイル記述子digitをファイル記述子nに移動し、nが指定されなければ標準出力(ファイル記述子1)に移動する。
      if n is not specified.


=== Opening File Descriptors for Reading and Writing ===
=== Opening File Descriptors for Reading and Writing ===