A very common (if not utterly foolproof) way to check for an interactive terminal is to check whether PS1 is set: if [[ -z "$PS1" ]]; then ...
確定! 回上一頁