Skip to content

Instantly share code, notes, and snippets.

@cowboy-cod3r
Created December 7, 2013 18:05
Show Gist options
  • Save cowboy-cod3r/7846306 to your computer and use it in GitHub Desktop.
Save cowboy-cod3r/7846306 to your computer and use it in GitHub Desktop.
Bash: File/Folder Functions
# Get the current file
current_file = $0
# Get the full path to the current file
full_file_path="$(readlink -f $(dirname $0))/$(basename $0)"
# Get the full directory path to the current file
full_dir_path="$(readlink -f $(dirname $0))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment