有/bin/bash,我如何检测用户的$ PATH变量中是否有特定的目录?
/bin/bash
例如
if [ -p "$HOME/bin" ]; then echo "Your path is missing ~/bin, you might want to add it." else echo "Your path is correctly set" fi
bash shell path
bash ×1
path ×1
shell ×1