1 #!/bin/sh 2 #進行windows paths目錄同步 3 cd /mnt 4 5 str="//10.33.4.199/linux" 6 result=$(df | grep ${str} ) 7 if [[ "$result" != "" ]] 8 then 9 echo "/mnt/patches 已成功掛載到//10.33.4.199/linux" 10 else 11 echo "正在進行/mnt/patches掛載//10.33.4.199/linux" 12 mount -t cifs -o username="administrator",password="hxsd@123" //10.33.4.199/linux /mnt/patches 13 fi