From: Bruce Atherton [mailto:[EMAIL PROTECTED]
> >95% of unix versions don't have /bin/bash
>
> The problem is that $OSTYPE is only defined in bash, so in theory the
> script itself requires bash.
Not at all.
sh does not (normally) fail on undefined variables.
It is perfectly valid to test the value of $OSTYPE on all versions
of /bin/sh.
> Does anyone know whether the members of the cygwin mailing
> list have any
> advice on the preferred method for detecting that you are
> running in cygwin
> from within their /bin/sh?
I don't know what they say, but I strongly suggest using uname.
For me, uname -a gives:
CYGWIN_NT-4.0 <<hostname>> 1.3.2(0.39/3/2) 2001-05-20 23:28 i686 unknown
Or
uname -s
CYGWIN_NT-4.0
Is that still the case on later versions?
NOTICE
This e-mail and any attachments are confidential and may contain copyright
material of Macquarie Bank or third parties. If you are not the intended
recipient of this email you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all copies of
them. Macquarie Bank does not guarantee the integrity of any emails or any
attached files. The views or opinions expressed are the author's own and may
not reflect the views or opinions of Macquarie Bank.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>