摘要: 在脚本中使用sudo命令,将密码保存在脚本中,不需要手动输入密码。 #!/bin/bash echo 'xxx密码xxx'|sudo -S service mysql start echo 'xxx密码xxx'|sudo -S reboot 阅读全文
posted @ 2016-08-18 10:48 Hello_2018 阅读(641) 评论(0) 推荐(0) 编辑