linux/solaris + 標準出力操作

linux/solaris + 標準出力操作

Linux / solarisシステムで次の行を実行します(すべての出力はapplication.binの/tmp/Logに書き込まれます)。

 ./application.bin 1>>/tmp/Log

/tmp/Log ファイルの内容を表示できます。

 more /tmp/Log

/etc/opt/OA/share/conf/OpC/mgmt_sv/ui/registration/C/opc_op /etc/opt/OA/share/conf/analysis/system_odbc.iniaaaa
/etc/opt/OA/share/conf/ovspmd.authaaaa
/etc/opt/OA/share/conf/ovwdb.authaaaa
/etc/opt/OA/share/conf/ovw.authaaaa 

私の質問:

構文で何を変更または追加する必要がありますか?

   "1>>/tmp/Log" ? 

次の例に示すように、各行の間にスペースを追加するには

       /etc/opt/OA/share/conf/OpC/mgmt_sv/ui/registration/C/opc_op
  .
       /etc/opt/OA/share/conf/analysis/system_odbc.iniaaaa
  .
       /etc/opt/OA/share/conf/ovspmd.authaaaa
  .
       /etc/opt/OA/share/conf/ovwdb.authaaaa
  .
       /etc/opt/OA/share/conf/ovw.authaaaa 

注 - /tmp/Logを作成した後に各行間にスペースを追加するオプションは関係ありません。

ベストアンサー1

./application.bin | sed '$!G' >> /tmp/Log

おすすめ記事