I have a bash
script which I'm running with sudo
: sudo NewScript
Inside the script, I have a git
command which I don't want to run with sudo
. Currently, since the entire script is run with sudo
this command also runs with sudo
and that's what I would like to suppress.
Is such thing possible or do I need to run the script without sudo
and add sudo
for every command inside the script other than the git
command?