Skip to content

Instantly share code, notes, and snippets.

@bencord0
Created January 18, 2019 15:20
Show Gist options
  • Save bencord0/7034a7cbcfe764aac64c1039decf2318 to your computer and use it in GitHub Desktop.
Save bencord0/7034a7cbcfe764aac64c1039decf2318 to your computer and use it in GitHub Desktop.
cd into the directory of this script (bash-5 edition)
#!/bin/bash
cd "$(dirname "$(readlink -f "${BASH_ARGV0}")")"
echo "${PWD}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment