test for hard links always fail with pdksh

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Thu Feb 25 15:44:00 GMT 2010


On Thu, Feb 25, 2010 at 01:05:06PM +0100, Corinna Vinschen wrote:
>On Feb 25 01:30, Paul McFerrin wrote:
>> A new wrinkle with hard links.  If you are testing for them in
>> pdksh, they will always fail.  I.E.:
>> 
>>    if test -L links/$filename.$inumb
>>    then :
>>    else
>>       ln $filename $filename.$inumb
>>    fi
>> 
>> The above test will always fail and thus will always attempt to
>> re-create the hard link.
>
>$ man test
>
>test -L tests for symbolic links, not for hardlinks.

So both the program and the documentation are wrong???  Who'd have thought it?

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list