Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コマンドを含む実行可能なbashファイルがあります。
これらのファイルは、行が端末によって実行されるため、実行されているものを表示していないようです。
実行中の行を表示する方法はありますか?
もう 1 つのオプションは、set -x実行してデバッグを開始する場所をスクリプトに追加することです。ストップにも使えますset +x。
set -x
set +x
例:
#!/bin/sh set -x echo "This will be debugged" set +x echo "This will not be debugged"