Basically I need to run the script with paths related to the shell script file location, how can I change the current directory to the same directory as where the script fil
#!/bin/bash
pushd $(dirname "${0}") > /dev/null
basedir=$(pwd -L)
# Use "pwd -P" for the path without links. man bash for more info.
popd > /dev/null
echo "${basedir}"