2
実行時のコマンドの各出力のプレフィックス
モジュラースクリプトを作成しようとしています。単一のスクリプトから呼び出されるスクリプト/コマンドがいくつかあります。 各コマンドの出力にプレフィックスを付けたい。 例: 私のファイルはすべてcommands.sh / command1.sh / command2.shです command1.shの出力 file exists file moved command2.shの出力 file copied file emptied allcommands.shは、スクリプトcommand1.shおよびcommand2.shを実行します これらの2つのスクリプトの各出力のプレフィックスを次のようにします。 [command1] file exists [command1] file moved [command2] file copied [command2] file emptied