Um exemplo como resposta
Dois scripts no mesmo caminho
-
script1#!/bin/bash ./otherScript echo "script1" | tee script1.log -
otherScript#!/bin/bash echo "otherScript"
Permite iniciar script1 e verificar a saída
% ./script1
otherScript
script1
e o arquivo de log script1.log , criado em script1
% cat script1.log
script1