4 ms·
I've tried to adopt powershell, and here are the obstacles I encountered: 1) You can't write or run scripts "out of the box", you need to do a security incanta
by pjc50 11y ago
I've tried to adopt powershell, and here are the obstacles I encountered:
1) You can't write or run scripts "out of the box", you need to do a security incantation first. A oneoff hurdle, but right at the start of the learning curve.
2) Perhaps because of (1), it's not very dogfooded: on a UNIX system, there are lots of already-existing shell scripts sitting around as parts of the OS. PS is not so rich in examples.
3) If you do actually want to parse data, it's not very good at this.
4) I've not worked out how to save intermediate stages in a pipeline to persistent storage.
5) Hasn't yet developed much of a "user culture", although I think that will come eventually.
- pjmlp 11y agoRegarding 1), at least it avoids the curl | sh => send $HOME to the world of current UNIX users.
- nailer 11y agoYou can't run scripts out of the box on nix either: you either need to manually mark the script as executable or invoke the interpreter and pass it as a parameter. Not saying that's a bad thing, just that we (as Unix folks) do things intuitively that we forgot we once not intuitive. Totally agreed on 2 though 5 though.
- noselasd 11y agoWhat comes to mind by 4), is "tee", which powershell also has - but that's perhaps not what you want/mean ?
- pjc50 11y agoAlmost, but not quite. Tee writes the pipeline to disk as text; you can't trivially take the written output and pipe it back in as objects. It's lost the magic.
- noselasd 11y agoFair point. I believe you can use the Export-Clixml/Import-Clixml or ConvertTo-Xml/ConfertFrom-Xml for doing just that.