How to determine which shell I am using (Unix/MacOS/Linux)

ps -p {pid} or better: ps -p $$

So what is a $ argument passed to the -p option? Remember $ returns the PID (process identification number) of the current process, and the current process is your shell. So running a ps on that number displays a process status listing of your shell. In that listing, you will find the name of your shell (look for CMD column).

Source: https://www.cyberciti.biz/tips/how-do-i-find-out-what-shell-im-using.html