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
A general solution for any $path, rather than just $0
$path
$0
[ "$path" != "${path#/}" ] && echo "absolute" || echo "relative"