Dien Nguyen
Dien Nguyen

Reputation: 2059

Automation on Windows with Bash like syntax

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

Answers (3)

masterziv
masterziv

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

sorpigal
sorpigal

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

IronMensan
IronMensan

Reputation: 6821

You could install cygwin and run bash.

Upvotes: 2

Related Questions