|
From: | P |
Subject: | Re: Normalizing pathnames |
Date: | Thu, 07 Oct 2004 12:03:48 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 |
Suresh Krishnan wrote:
Hi Paul,Thanks for the quick response. readlink -f does almost everything I want. The only thing it does not do is to verify whether the path is valid. I can add this on very easily in my script.
That got me thinking. If the path doesn't exist then I think readlink -f should just return the canonicalized path (the output from realpath). That would be more useful that just stopping at the first invalid path component? I.E. I think the output from the following should be /usr/1/2/3 rather than /user/1 readlink -f /usr/share/../1/2/3 Pádraig.
[Prev in Thread] | Current Thread | [Next in Thread] |