Skip to content

Instantly share code, notes, and snippets.

@herdianf
Created December 4, 2023 15:34
Show Gist options
  • Save herdianf/2c0164b83e38958d6cb9a9bd69d6fde9 to your computer and use it in GitHub Desktop.
Save herdianf/2c0164b83e38958d6cb9a9bd69d6fde9 to your computer and use it in GitHub Desktop.
Bash Relative to Source
#!/bin/bash
BASE=$(dirname $(realpath $0))/..
echo $BASE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment