Reputation: 2059
Is there a way that we can write automation scripts in bash syntax and run it on Windows host (We can call the executable file .exe of Windows). The Windows batch syntax looks quite complex :D
Any suggestions are appreciated.
Upvotes: 1
Views: 278
Reputation: 91
You can use cygwin or mingw sys for this.
They are both just BASH implementation available on WinXX (actually they are much more, but you need now only bash). But there are some differences:
cygwin uses its own file system hierarchy, with Win drives mapped to a part. subdirs. All related to file names is more unix-style. There are some problems with passing pathnames to Windows programs.
MinGW is more Windows friendly, file paths are like in Windows, less problems with Windows native programs.
You should try yourself and choose what you need.
Upvotes: 5
Reputation: 26086
You can get a win32 port of bash. Cygwin is enormous, but native windows bash and a few utilities can be had for a much smaller footprint.
Start with UnxUtils, which includes a sh
based on zsh
(it's quite slow, though).
If that's not enough you can get a win32 bash from some places, though most are older versions.
Upvotes: 2