X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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]" To: "cygwin AT cygwin DOT com" Subject: RE: Little cygpath improvement request Date: Sun, 16 Feb 2014 18:30:15 +0000 Message-ID: <6CF2FC1279D0844C9357664DC5A08BA224229D@MLBXV06.nih.gov> References: <111910987 DOT 20140214222230 AT mtu-net DOT ru> <52FE6397 DOT 5010105 AT cygwin DOT com> <187072112 DOT 20140214234339 AT mtu-net DOT ru> <20140215125606 DOT GM2246 AT calimero DOT vinschen DOT de> <1745533059 DOT 20140215225708 AT mtu-net DOT ru> <20140216120042 DOT GP2246 AT calimero DOT vinschen DOT de> <40596392 DOT 20140216184131 AT yandex DOT ru> <20140216151107 DOT GT2246 AT calimero DOT vinschen DOT 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.