linux シェルスクリプト exec tee 画面 ログファイル

・exec と tee を使用して、標準出力 / 標準エラー出力の両方を画面とログファイル all.log にリダイレクトする


#!/bin/bash

exec &> >(tee -a all.log)

echo "test"

コメント

このブログの人気の投稿

AWS Cloudformation ImportValue Sub 併用