Note that I'm assuming here that you're actually running within CygWin (the bash shell of it) so paths should already be correctly set up.
So the bash code to do such a check would be along the lines of: unameOut='$(uname -s)' But you may have to experiment with all sorts of different versions. Usually, uname with its various options will tell you what environment you're running in: pax> uname -aĬYGWIN_NT-5.1 IBM-元F3936 1.5.25(0.156/4/2) 19:34 i686 CygwinĪnd, according to the very helpful schot (in the comments), uname -s gives Darwin for OSX and Linux for Linux, while my Cygwin gives CYGWIN_NT-5.1.