[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 <monoped@sudrala.de> 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 :-) ]
jon.
- Re: equivalent of Linux readlink -f in pure bash?, (continued)
- Re: equivalent of Linux readlink -f in pure bash?, Jon Seymour, 2011/08/09
- Re: equivalent of Linux readlink -f in pure bash?, Jon Seymour, 2011/08/09
- Re: equivalent of Linux readlink -f in pure bash?, Bob Proulx, 2011/08/09
- Re: equivalent of Linux readlink -f in pure bash?, Jon Seymour, 2011/08/09
- Re: equivalent of Linux readlink -f in pure bash?, Andreas Schwab, 2011/08/09
Re: equivalent of Linux readlink -f in pure bash?, Bernd Eggink, 2011/08/09
Re: equivalent of Linux readlink -f in pure bash?,
Jon Seymour <=
Message not available
Message not available
Re: equivalent of Linux readlink -f in pure bash?, Stephane CHAZELAS, 2011/08/11