Well, that didn't take long: within a week of applause for Microsoft's decision to open-source PowerShell, a comment-war has broken out over
curl
andwget
.For those not familiar with these commands: they're open source command line tools for fetching Internet content without a browser. Apart from obvious applications like downloading whole sites (for example as backup), they're also under the hood for a lot of other toolsets (an example the author is familiar with – GIS tools use
curl
and/orwget
to fetch maps from Web services).For some reason, Microsoft's team decided to put aliases for
curl
andwget
in Windows PowerShell – but, as this thread begins, those aliases don't delivercurl
andwget
functionality.The pull request says the aliases should be spiked: "They block use of the commonly used command line tools without providing even an attempt to offer the same functionality. They serve no purpose for PowerShell users but cause confusion and problems to existing
curl
andwget
users."
-- submitted from IRC
(Score: 2) by NotSanguine on Tuesday August 23 2016, @02:20PM
As an aside, using bash, perl, python and/or a myriad of other tools on Windows systems creates portable tools which can run, unmodified, pretty much everywhere.
I guess the use case for a cross-platform powershell is if you only know powershell and/or have a large library of PS scripts.
However, powershell (IMHO) is pretty painful to use compared with other scripting languages. Better to learn Perl or Python, and shell (Bourne, Korn, C or other), methinks.
No, no, you're not thinking; you're just being logical. --Niels Bohr
(Score: 3, Informative) by NCommander on Tuesday August 23 2016, @03:07PM
PowerShell's programming model is better than bash but its got a fundamental design flaw that makes it unpleasant to work with.
Basically, in PS land, every cmdlet is an object. So I can call for a NS lookup, and then work with that as an object; for scripting that's far better cleaner than shell scripts (and PowerShell is essentially a bash alternative on Windows). The problem is the pipeline. If you don't catch objects, they can "leak". Basically, if I do "Resolve-DNSName" or something similar, and don't catch the return code, the object leaks into the pipeline, and can be retrieved by something completely unrelated and unexpectedly. The behavior is incredibly uninutive when it happens, and its gotten me to the point that I have to catch everything to make sure the pipeline is pristine in all cases.
Still always moving