Hacker News new | ask | show | jobs
by YorkianTones 4064 days ago
Bash scripts run in Powershell. We have hundreds of bash scripts for infrastructure build/deploy/etc. and they are cross-platform. On windows we execute them in Powershell. Powershell's been around for a decade and runs on XP and above (edit: and ships with Windows, I think Win7 and above).

http://en.wikipedia.org/wiki/Windows_PowerShell

http://stackoverflow.com/questions/1098786/run-bash-script-f...

1 comments

> Bash scripts run in Powershell

...if you install Bash [1] so PowerShell can execute it. In much the same way that batch files can call Bash, or Windows Explorer can if you double click on it.

> A caveat to the accepted answer is that sh is not included in vanilla Powershell. I had to install Git, which optionally adds some UNIX tools to the PATH in Powershell, sh.exe being one of them.

> Note: sh.exe or another *nix shell must be associated with the .sh extension.

[1] http://stackoverflow.com/questions/1098786/run-bash-script-f...