Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Executing unix command from script

by sgifford (Prior)
on Jul 09, 2008 at 02:29 UTC ( #696372=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://696372]
help
Chatterbox?
[1nickt]: The Google-fu is strong with this one.
[1nickt]: I was looking at Best Buy since like the in-store return/repace plan ... but the 17" HP Envy they have is not this one ....
[1nickt]: May be brand new ... 0 reviews on the site.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-03-26 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.