Skip to content

Instantly share code, notes, and snippets.

@glegoux
Last active May 22, 2018 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glegoux/08d231e0d474fb7fe5039374793e2253 to your computer and use it in GitHub Desktop.
Save glegoux/08d231e0d474fb7fe5039374793e2253 to your computer and use it in GitHub Desktop.
[Sh] Get current shell in session result: sh (or dash), bash, zsh, ksh, tcsh, fish
#!/usr/bin/env sh
#
# You can see all available shell with cat /ect/shell .
# The Linux available shells are: sh (or dash), bash, zsh, ksh, tcsh, fish
ps -p $$ --no-headers -o cmd
# or ps | grep -E "^$$" | awk '{print $NF}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment