哪个外壳解释器运行没有shebang的脚本?
假设我帐户的默认外壳是zsh,但是我打开了终端并启动了bash并执行了一个名为的脚本prac002.sh,那么该外壳解释器将用于执行zsh或bash脚本?考虑以下示例: papagolf@Sierra ~/My Files/My Programs/Learning/Shell % sudo cat /etc/passwd | grep papagolf [sudo] password for papagolf: papagolf:x:1000:1001:Rex,,,:/home/papagolf:/usr/bin/zsh # papagolf's default shell is zsh papagolf@Sierra ~/My Files/My Programs/Learning/Shell % bash # I fired up bash. (See that '%' prompt in zsh changes to '$' prompt, indicating bash.) papagolf@Sierra:~/My Files/My Programs/Learning/Shell$ ./prac002.sh …