mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
775 B
775 B
Get the current shell
TL;DR
# Full path of the current shell's executable with arguments.
ps -o 'command='
# Full path of the current shell's executable only.
ps -o 'comm='
# Only the executable name.
ps -co 'comm='
# Unreliable: if the SHELL variable is set by a previous shell, that one is the
# value that will be shown.
echo "$SHELL"
echo "$0"