How do I run a shell script in Cygwin?

sh on the script file name, then you can keep the same script for Cygwin and Unix (Macbook)…Note: On Windows, you need to use the file explorer to do following once:

  1. Open the file explorer.
  2. Right-click on a file with .sh extension, like test1.sh.
  3. Open with… -> Select sh.exe.

For More Information Please Refer:
https://stackoverflow.com/questions/15736898/running-a-shell-script-through-cygwin-on-windows
You May Also Like to Read: