This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Little cygpath improvement request
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 16 Feb 2014 18:37:09 -0600
- Subject: Re: Little cygpath improvement request
- Authentication-results: sourceware.org; auth=none
- 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> <6CF2FC1279D0844C9357664DC5A08BA224229D at MLBXV06 dot nih dot gov>
On Sun, Feb 16, 2014 at 12:30 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote
> if [ ! -z "$2" ] ; then NATIVE="$(cygpath -ml "$2")" ; fi
That might better be written as this
[ "$2" ] && NATIVE=$(cygpath -ml "$2")
You do not need the extra quotes when setting a variable in this way.
--
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