Reini Urban wrote:If I specified "#! /bin/bash" at the first line of my shell script, is it enough to make Cygwin understand that I want to use bash instead of ash ??FAQ: http://cygwin.com/faq/faq_3.html#SEC43 cygwin's /bin/sh is ash, on most other platforms it is /bin/bash.
If you want it to behave it exactly like on other platforms, and you use bash specific constructs, use the /bin/bash shebang.
sure. you'd need to do that on every platform if you use bash specifics. it is considered good style.
but as igor already posted, your problem is only marginally better on bash. you should really use exact quoting: test 'eval "$cmd"'
or even better use Igor suggestions with testing against the return value.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/