How to test what shell I am using in a terminal?
I want to detect which interpreter a shell script is using. For example the following script:
Should reveal the interpreter:
If it's a local user, the 7th field of /etc/passwd is their shell. Are you looking for the currently preferred shell?