Hi All,
As we know whenever we need to execute some script/program on Mac/Linux with root permissions for a user, then we run that script with "sudo". E.g
$sudo ./some_script
password:
After execution of the command on terminal, a password prompt comes and waits for user to provide password. I have been searching for the methodology that will not wait for password prompt. Because lots of coding efforts needs to be provided to provide password on "password" prompt.
So, the solution is simple, just type -
$ echo password
| sudo -S ./some_script
I have sudo 1.7.0 version installed on my Ubuntu machine.
This will not wait for the password prompt and you would be able to run ./some_script with sudo permissions.