Unityのログをファイルに書きつつ出力もする(Windowsのbashでもteeみたいなことがしたい!)

unity_tee.bash
Unity.exe \
  -batchmode \
  -logFile EditorLog.txt \
  -projectPath ProjectPath
process_id=$!
tail -f EditorLog.txt &
tail_pid=$!

wait $process_id
unity_status=$?
kill $tail_pid
exit $unity_status