I have the following script in my user's bin directory; let's pretend the filename is 'myScript':
#!/bin/bash
python3 /myPath/myProgram.py "$@"
From the commandline, if I type myScript, it launches my myProgram.py. If I type sudo myScript, however it gives me this error: sudo: myProgram: command not found.
Why doesn't this work? How can I make it work?
Thanks!