X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; q=dns; s=default; b=u2uKVwbyoxk+j7LGn/FV35ZrFBoIy
	CHLFjH8G2vF7uWCsQi9rYA2e7qdRnZpZJGHwMZWtPqGzGHip5yCZ73ZnliPFWP0z
	nGbSmeJ6XzA7VZ+gb9w3iyqwilrvyNLlcE/1vF6YqlH8a/ek5KfaiGOkCgDy9eMn
	lgcCIx8LJR6/6Y=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; s=default; bh=/WBLhwYBD5zN7SmEesDBT53f9qM=; b=gSp
	GnqIHstNGA3FdOhD8gdQmUTVX9Q4V1fZ8ztysOHQfwEplUXMModPMCPnaOS6am5q
	wjabTssEAATPiN5vB1GV1866KpgpBmvG/UQjgZzqYyttR4icmqUPVs9iA6Z0w5sH
	YP3wz/kH3QbwDkVemfxcDIeXBJwU0kfkPxFU9SLY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: nihxway3out.hub.nih.gov
X-IronPortListener: Outbound_SMTP
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ai0FACgDAVOcKEel/2dsb2JhbABZgwaBD4MCuS6DBhh3FnSCJgEBBBIREVUCAQgNDQIGIAICAh0TFRACBBsah2OeYoofoSUXgSmNJxYigm81gRQEjmOQOIs0gy2CKg
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder@niaid.nih.gov>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Little cygpath improvement request
Date: Sun, 16 Feb 2014 18:30:15 +0000
Message-ID: <6CF2FC1279D0844C9357664DC5A08BA224229D@MLBXV06.nih.gov>
References: <111910987.20140214222230@mtu-net.ru> <52FE6397.5010105@cygwin.com> <187072112.20140214234339@mtu-net.ru> <20140215125606.GM2246@calimero.vinschen.de> <1745533059.20140215225708@mtu-net.ru> <20140216120042.GP2246@calimero.vinschen.de> <40596392.20140216184131@yandex.ru> <20140216151107.GT2246@calimero.vinschen.de>
In-Reply-To: <20140216151107.GT2246@calimero.vinschen.de>
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id s1GIUVZg008738

Corinna Vinschen sent the following at Sunday, February 16, 2014 10:11 AM
>> >   NATIVE=$(cygpath -ml "$2" 2>/dev/null)
>
>And what's the problem with redirections?
>
>I fail to see the big difference between adding a redirection compared
>to adding an option character.

Some of us avoid redirections because we do it so rarely that getting it
correct becomes a long experimental process.

But as an alternative to redirection, one can test for an empty path.

if [ ! -z "$2" ] ; then NATIVE="$(cygpath -ml "$2")" ; fi

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

