X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 25 Feb 2010 10:44:48 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: test for hard links always fail with pdksh
Message-ID: <20100225154448.GB29140@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4B8618EE.2070807@columbus.rr.com>  <20100225120506.GO5683@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100225120506.GO5683@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

