[Top][All Lists]

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

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

From: Jon Seymour
Subject: Re: equivalent of Linux readlink -f in pure bash?
Date: Wed, 10 Aug 2011 00:50:01 +1000

On Tue, Aug 9, 2011 at 7:29 PM, Bernd Eggink <address@hidden> wrote:
> On 09.08.2011 03:44, Jon Seymour wrote:
>> Has anyone ever come across an equivalent to Linux's readlink -f that
>> is implemented purely in bash?
> You can find my version here:
>        http://sudrala.de/en_d/shell-getlink.html
> As it contains some corrections from Greg Wooledge, it should handle even
> pathological situations. ;)
> Bernd

Thanks for that. ${link##*-> } is a neater way to extract the link.

It does seem that a link create like so: ln -sf "a -> b" c is going to
create problems for both your script and mine [ not that I actually
care about such a perverse case :-) ]


reply via email to

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