I have a script:
#!/bin/bash
echo "$(dirname $(readlink -e $1))/$(basename $1)"
that sits here: /home/myuser/bin/abspath.sh
which has execute permissions.
If I run echo $PATH
I get the following: /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin
I wish to be able to, from any directory, call abspath <some_path_here>
and it call my script. I am using bash, what I am doing wrong?