3 ms·
Thanks, that's a great breakdown. I'm not too worried about libraries, as I try to avoid importing code willy nilly, but have you used pwsh extensively on nix?
by SuperNinKenDo 3y ago
Thanks, that's a great breakdown. I'm not too worried about libraries, as I try to avoid importing code willy nilly, but have you used pwsh extensively on nix? How powerful is the object/data model when it doesn't have access to COM/.NET/etc? Does it create integrations/reimplementations for distinctly nix things like device files? Or will I basically be writing a lot of compatibility layers to get raw text into structured data?
- 22c 3y agoMy use of non-Windows PowerShell is mainly used to sanity checking scripts that are destined to run on Windows boxes, where I want to quickly check the semantics of certain OS agnostics behaviour without firing up a remote desktop to a Windows VM. Running things like: Get-Item -Path ./ | ConvertTo-Json $my_bytes = @(Get-Content -AsByteStream -TotalCount 16 /dev/urandom) work exactly as you'd expect them to on *nix. I don't have procfs on my system but I imagine that would work just the same as interacting with any other file. PSDrive works the same as you would expect, including things like reading/manipulating ENV via the "Env:" PSDrive. I can't think of anything off the top of my head that you can do in Bash that you couldn't do in PowerShell.