- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 52字
- 2021-07-09 19:46:00
Identifying the current shell
To identify the shell which is currently being used, use the SHELL environment variable.
echo $SHELL
Alternatively, use this command:
echo $0
Consider this example:
$ echo $SHELL /bin/bash
Also, by executing the echo $0 command, we will get the same output:
$ echo $0 /bin/bash