# if not already ran, run to change permisions executable.
chmod 755 foo.sh
# then to run the sh file
./foo.sh
./yourscript.sh
sh yourfile.sh
./file.sh
./scriptname.sh
sh /path/to/file
./script-name-here.sh #Chage the "script-name-here" to the name of the .sh file.
self.returncode = subprocess. run(self.shellScriptPath, input='yes
', text=True).returncode