Skip to content

Instantly share code, notes, and snippets.

@BCadet
Created August 1, 2022 07:47
Show Gist options
  • Save BCadet/bfdaf671d958e376cadc35846e90f784 to your computer and use it in GitHub Desktop.
Save BCadet/bfdaf671d958e376cadc35846e90f784 to your computer and use it in GitHub Desktop.
get absolute path of a script
#! /bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment