I created Shell Script on Linux and it runs fine.
Now I want to run the same script on Windows using gitbash. (Only filepath changed for windows)
I am confused:
- do I need to write a new shell script again according to Windows syntax shell script?
or
- can a Linux syntax shell script run on Windows without changes?
According TO differences-between-windows-batch-and-linux-bash-shell-script-syntax
bashon windows, as well as some other UNIX shells (ash,tcsh) ... However, there are many minor problems you may encounter, as Windows & UNIX are very different ... If you want to make something cross-platform, I advise using Python, Java, Ruby, or some other language better suited for this job.cygwin.