in reply to Executing unix command from script
Any idea something like if i invoke my script with root privileges those privileges are inherited to commands in the script which avoids prompting of password each time
That's actually exactly what happens: if your script runs as root, anything it runs will also run as root. If you run your main script under sudo, it will run as root, so none of the commands it runs should need sudo to run.
|
---|
In Section
Seekers of Perl Wisdom