On 12/02/2011 09:30 AM, Voelker, Bernhard wrote:
> Pádraig Brady wrote:
>> On 12/02/2011 01:21 AM, Guillaume Kielwasser wrote:
>>> and what about something like:
>>>
>>> getpath -C|--canon        // simulate realpath
>>> getpath -R|--relative     // simulate relpath
>>> getpath -L|--link         // simulate readlink
>>
>> A good suggestion, thanks.
>>
>> It's the right level of functionality to provide at the shell level.
> 
> +1 from me.

Jim's point about 'path' ambiguity is valid.
I guess using 'getpathname' would address that.
Also 'realpath' is a bit less ambiguous than 'getpath'
in this regard I think.

> Just to think in another direction (not claiming this is the best idea):
> I could also imagine the --canon and --link functionality in stat.
> --relative doesn't suit there.

Possibly. I think FreeBSDs readlink implementation is from the stat binary.
It's behind a separate readlink name though, so that's just from
an implementation rather than an interface perspective.

cheers,
Pádraig.

Reply via email to