As stated in the title, I need to determine when a program is ran if the path is relative or absolute:
./program #relative dir/dir2/program #relative ~User/d
if [[ "$0" = /* ]] then : # Absolute path else : # Relative path fi