Skip to content

Instantly share code, notes, and snippets.

@cr-chsn1
Created May 4, 2021 06:32
Show Gist options
  • Save cr-chsn1/bda64eb9bba69a08004103ff7b9ae30c to your computer and use it in GitHub Desktop.
Save cr-chsn1/bda64eb9bba69a08004103ff7b9ae30c to your computer and use it in GitHub Desktop.
Bash script gets to know itself
script="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment