bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: equivalent of Linux readlink -f in pure bash?


From: Bob Proulx
Subject: Re: equivalent of Linux readlink -f in pure bash?
Date: Mon, 8 Aug 2011 20:49:54 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Jon Seymour wrote:
> Has anyone ever come across an equivalent to Linux's readlink -f that
> is implemented purely in bash?
> 
> (I need readlink's function on AIX where it doesn't seem to be available).

Try this:

  ls -l /path/to/some/link | awk '{print$NF}'

Sure it doesn't handle whitespace in filenames but what classic AIX
Unix symlink would have whitespace in it?  :-)

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]