How to check if running in Cygwin, Mac or Linux?
I have a shell script that is used both on Windows/Cygwin and Mac and Linux. It needs slightly different variables for each versions. How can a shell/bash script detect whether it is running in Cygwin, on a Mac or in Linux? 10 Answers 10