[ale] bash, full filename
David Corbin
dcorbin at users.sourceforge.net
Tue Dec 2 21:09:13 EST 2003
On Saturday 29 November 2003 18:46, Geoffrey wrote:
> David Corbin wrote:
> > How can I take a filename (which may or may not be relative) and
> > convert it to be a fully qualified filename, in bash?
>
> type vi |awk '{print $NF}'
>
> This will only work if it's in your path. If not, you're going to have
> to use locate or find.
I don't think that comes close to what I want. (But thanks for trying).
I want to be able to convert:
foobar to /home/dcorbin/foobar (if I'm in /home/dcorbin)
/etc/passwd to /etc/passwd
../fred/foobar to /home/fred/foobar (if I'm in /home/dcorbin)
PATHs (in the sense of your example) are just not a factor.
--
David Corbin <dcorbin at users.sourceforge.net>
More information about the Ale
mailing list