I don’t think it’s strictly compliant, although they claim to have based it’s syntax on Korn shell, which is the strictest definition of POSIX shells.
You can do pretty much everything in powershell that you can do in something like bash BUT, it will be done slightly differently, so trying to make a script cross compatible is pointless (you might as well just write it natively in powershell etc).
Powershell isn’t inherently bad, unlike bash for instance which just allows piping out text output, Powershell can pass around true .net objects.
But if what you’re looking for is cross OS compatability, you’re pushing shit uphill.
99.9% of the time, I open powershell and just ssh into a “real” linux box.
I am not a greybeard expert with deep bash history, but I though the posix compliant aspect of PowerShell was a very recent, though apparently not perfect, achievement even if “technically” NT was POSIX compliant by some specific definition in 1993.
Isn’t Powershell a POSIX compliant shell now? I know that isn’t “gnu/linux” but it certainly allows a lot of familiarity between the environments.
I don’t think it’s strictly compliant, although they claim to have based it’s syntax on Korn shell, which is the strictest definition of POSIX shells.
You can do pretty much everything in powershell that you can do in something like bash BUT, it will be done slightly differently, so trying to make a script cross compatible is pointless (you might as well just write it natively in powershell etc).
Powershell isn’t inherently bad, unlike bash for instance which just allows piping out text output, Powershell can pass around true .net objects.
But if what you’re looking for is cross OS compatability, you’re pushing shit uphill.
99.9% of the time, I open powershell and just ssh into a “real” linux box.
Lol except they aliased wget and curl but dont parse the standard options 😡
That’s borderline criminal. Nothing more to add
powershell is inherently bad btw
How can it be? It’s oo. Not saying you’re wrong. Honestly curious
https://en.m.wikipedia.org/wiki/Microsoft_POSIX_subsystem
Since 1993.
Thanks, this explains:
So the interactive part, the shell itself, is not compliant. That is why I was confused
I am not a greybeard expert with deep bash history, but I though the posix compliant aspect of PowerShell was a very recent, though apparently not perfect, achievement even if “technically” NT was POSIX compliant by some specific definition in 1993.
As far as I understand, these are posix requirements https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18
Powershell is not compliant with that document even now in the interactive part. Wsl2 is, as one can istall a standard Linux shell
bruh
That was Windows NT and was done for C builds so that Microsoft could compete for US government contracts