I would write case ":$PATH:" in *:$HOME/mydir:*) echo it is in the path;; *) echo not there ;; esac. I write ":$PATH:" to ensure that the pattern matches if ...
確定! 回上一頁