3 ms·
> PowerShell. It is the only shell that works on Windows/Linux/OS X What? POSIX sh
by sshine 4y ago
> PowerShell. It is the only shell that works on Windows/Linux/OS X
What? POSIX sh
- jcranmer 4y agoWindows does not have a native POSIX shell. Nor does it have most of the POSIX utilities that are necessary to make a raw POSIX shell script usable. So you have to install an entire suite of utilities to make Windows look like it is POSIX--there's a couple different such suites, each with their own quirks (especially as Windows' guts is pretty far from POSIX). And you still get to cringe because things like having to spawn a new process to compute a substring is expensive on Windows.
- darkwater 4y agoWell, and Linux (or MacOS) doesn't have PowerShell natively either, and PS has a smaller user base and it's more Windows-focused (just look at the naming conventions).
- thedougd 4y agoAnd you're going to want to install a newer version of Powershell on the Windows machines because most do not ship with a version (e.g. 7) comparable to the MacOS/Linux versions.
- Pet_Ant 4y agoThey do have native Powershell. It builds natively on those platforms whereas Bash on Windows requires shims.
- cagey 4y agoFor at least the past 7 years I've installed 'Git for Windows'[1] on every Windows PC I use. Git for Windows comes with bash (my primary shell on Windows) plus a full suite of *nix utilities including Perl, awk, sed, pdftotext, ssh and many more. This has sufficed as my primary scripting platform on Windows, with the intended benefit that my scripts are mostly portable to Linux. [1] https://gitforwindows.org/ https://gitforwindows.org/