Little cygpath improvement request

Steven Penny svnpenn@gmail.com
Mon Feb 17 01:07:00 GMT 2014


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



More information about the Cygwin mailing list