View Full Version : [ubuntu] Help with Shell
August 2nd, 2010, 08:50 PM
Quick question... When you run a shell script using sudo, and there are commands within the script, is the word sudo required when writing the script? What I am trying to do is get a script working but some lines require sudo, but I would prefer if it would work in non debian linux distros...
August 2nd, 2010, 08:56 PM
If the script is run with root privileges (which it will be if it's prefaced with sudo) all the commands in it will be run as root, meaning they do not need to be prefaced with sudo. (People on other distros will just need to log in as root before running the script)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.