I would like an easy way to get the full path to a file. I currently type this:
echo `pwd`/file.ext
Trying to shorten it, I made a bash alias:
alias fp='echo `pwd`/'
But now if I type fp file.ext
, there is a space that appears between the /
and the file.ext
.
Does such a command already exist, and I am missing it? If not, how would I go about creating such an alias or function in bash?