使用read超時參數即可解決:
ex:
read -t5 DIR < <(df) if [ -n "$DIR" ];then echo $DIR else echo "read error" fi
感謝谷歌,方法出自:http://dbaspot.com/shell/404467-check-nfs-mount-script.html
使用read超時參數即可解決:
ex:
read -t5 DIR < <(df) if [ -n "$DIR" ];then echo $DIR else echo "read error" fi
感謝谷歌,方法出自:http://dbaspot.com/shell/404467-check-nfs-mount-script.html