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 reply to Re: Executing unix command from script
by sgifford
in thread Executing unix command from script
by Neminath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |