shell中使用sudo不输入密码

shell中使用sudo不输入密码


[mysql@localhost ~]$ cat aa.sh 
#!/bin/bash 
echo "password" | sudo -S cat /var/log/messages
请使用浏览器的分享功能分享到微信等