brasb 密码自动应答
1 #!/bin/sh 2 #mypasswd时密码 3 mypasswd=..... 4 echo ${mypasswd} | sudo -S brasb > /dev/null 2>&1 5 if [ $? = 0 ] 6 then 7 echo "OK" 8 else 9 echo "Failed" 10 fi
1 #!/bin/sh 2 #mypasswd时密码 3 mypasswd=..... 4 echo ${mypasswd} | sudo -S brasb > /dev/null 2>&1 5 if [ $? = 0 ] 6 then 7 echo "OK" 8 else 9 echo "Failed" 10 fi