This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Little cygpath improvement request


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]