From Super User comes a good answer:
Use the -S switch which reads the password from STDIN:
echo <password> | sudo -S <command>
Replace <password>
with your password.
From Super User comes a good answer:
Use the -S switch which reads the password from STDIN:
echo <password> | sudo -S <command>
Replace <password>
with your password.