这个while循环如何限制为最多10次重试?
#!/bin/sh while ! test -d /somemount/share/folder do echo "Waiting for mount /somemount/share/folder..." sleep 1 done
保持柜台:
#!/bin/sh while ! test -d /somemount/share/folder do echo "Waiting for mount /somemount/share/folder..." ((c++)) && ((c==10)) && break sleep 1 done