How do you trap / test the return from cygpath in a script. That is, if you want to convert a windows directory but you don't know if it exists yet, you can't use -d on it (since you don't know if it exists and it's not in a windows format). However, if you cygpath a directory that doesn't exist, it errors and throws a message. Piping the results to > /dev/null doesn't help, since you still get the error message.
Asked
Active
Viewed 248 times
0
-
1Use `&> /dev/null` to drop also the error message – matzeri Oct 10 '17 at 20:31
-
Weird. $ cygpath -ua $(cygpath -was "C:\Program Files\EmEditr") &> /dev/null produces cygpath: cannot create short name of C:\Program Files\EmEditr – GaryFurash Oct 11 '17 at 15:28