4 ms·
> However, the main benefit of bash is the portability This was the reason why I learned PowerShell. It is the only shell that works on Windows/Linux/OS X (to
by Pet_Ant 4y ago
> However, the main benefit of bash is the portability
This was the reason why I learned PowerShell. It is the only shell that works on Windows/Linux/OS X (to those who don't know, it's open source now: https://github.com/PowerShell/PowerShell https://github.com/PowerShell/PowerShell ).
Every team I join is a mix of Windows and Mac users with the occaisional Linux user. This is the only shell that you can use to across all three without compromise. Otherwise I find that whatever platform is dominant writes the helper scripts and the others get shrugs and "figure it out". Now, you could try to write them in Python, which isn't the worst idea, but it's not a shell.
- qclibre22 4y agoIs it installable using vanilla-esque yum or apt?
- adzm 4y agoIt needs the Microsoft repository registered if it is not already. Then you can just do the usual apt commands.
- Kon-Peki 4y agoIt's available as an Ubuntu snap. Not exactly what you are asking for... It's intentionally different than UNIX shells. If you are expecting UNIX shell behavior you will not like it. I have to use it at work for Windows stuff. It is amazing. But I would never install it on my home computer because I don't trust all the other Microsoft stuff that comes along with it. There is one big complaint that I do have with it - working with massive (multiple gigabyte) files is a pain. It wants to load the entire file before doing anything; most likely because it wants to treat everything as an object - therefore it has to build the objects before it can work with them.
- vladvasiliu 4y ago> I have to use it at work for Windows stuff. It is amazing. But I would never install it on my home computer because I don't trust all the other Microsoft stuff that comes along with it. Can it finally manage Office 365 and the like from Linux? I tried it once (1-2 years ago) to run some command that couldn't be done from the web interface. The docs said, "this should work". As I expected, it didn't. Some further digging turned up that it didn't support OAuth2 or something related to authentication.
- 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/
- counttheforks 4y agoBash is available on all of those platforms, and has a hell of a lot more momentum.
- AnIdiotOnTheNet 4y agoIt also has a hell of a lot more footguns.
- finnthehuman 4y ago> Now, you could try to write them in Python, which isn't the worst idea, but it's not a shell. jupyter notebooks have filled this void for me, especially with vscode integration and ipywidgets. I want to learn and like powershell, but my junk drawer of automation helpers is too full to start from scratch.
- majkinetor 4y agoU have Powershell notebooks https://github.com/dotnet/interactive https://github.com/dotnet/interactive