[CentOS] Real sh? Or other efficient shell for non-interactive scripts
Gordon Messmer
gordon.messmer at gmail.comFri Apr 24 19:32:41 UTC 2015
- Previous message: [CentOS] Real sh? Or other efficient shell for non-interactive scripts
- Next message: [CentOS] Real sh? Or other efficient shell for non-interactive scripts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/24/2015 09:59 AM, Steve Lindemann wrote: > > A script with no shebang will run in the environment of the account > running the script. Bad test on my part, apparently. $ python >>> import os >>> os.execv('/home/gmessmer/test', ('test',)) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 8] Exec format error So a script with no shebang will fail when the shell calls exec(). If that's so, then starting the executable script with an interpreter is probably shell-defined. In other words, each shell might do something different to run a script that has no shebang. Most probably do default to trying itself as the interpreter first. Interesting.
- Previous message: [CentOS] Real sh? Or other efficient shell for non-interactive scripts
- Next message: [CentOS] Real sh? Or other efficient shell for non-interactive scripts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list