I have a script that calls several other script and I run the script as sudo sudo ./main_script.sh
main_script.sh
#! /bin/bash
set -e
. /scritp1.sh
. /scritp2.sh
. /scritp3.sh
. /scritp4.sh
Is there any way to prevent one of the subscripts from running as sudo? (ie. scripts 1 2 and 4 run as sudo and script 3 run as normal)
.(orsource), or can they be run in subprocesses, like normal scripts?..