XL Fortran プログラムへの I/O は、コマンド行|でリダイレクト演算子を使用してリダイレクトすることができます。この演算子の指定および使用方法は、どの|シェルを実行しているかによって異なります。以下に ksh の例を挙げます。
$ cat redirect.f write (6,*) 'This goes to standard output' write (0,*) 'This goes to standard error' read (5,*) i print *,i end $ xlf95 redirect.f ** _main === End of Compilation 1 === 1501-510 Compilation successful for file redirect.f. $ # No redirection. Input comes from the terminal. Output goes to $ # the screen. $ a.out This goes to standard output This goes to standard error 4 4 $ # Create an input file. $ echo >stdin 2 $ # Redirect each standard I/O stream. $ a.out >stdout 2>stderr <stdin $ cat stdout This goes to standard output 2 $ cat stderr This goes to standard error
リダイレクトに関しては、「AIX コマンド・リファレンス 」の以下の項で詳細について参照できます。