Earlier quoted context omitted.
false equivalency
No, actually it's quite apt. PowerShell, or at least the concept behind PowerShel, is an improvement/superset over the Unix shells -- and can do whatever the shells can do, plus stuff they cannot do, because they don't support typed entities. Its problems are not technical or conceptual -- they are ecosystem and historical: lack of compatible tools, windows-only, etc.
PowerShell is open sourced and is available on Linux
561–570 of 790 posts
Re: PowerShell is open sourced and is available on Linux
#562Earlier quoted context omitted.
ip addr | awk '/inet / { print $2 }'
That doesn't work either. [kapil@localhost ~]$ ip addr | awk '/inet / { print $2 }' 127.0.0.1/8 192.168.128.236/24 [kapil@localhost ~]$ You guys are just proving my point. _I_ already know how to do it using bash. Its just that using objects and querying properties is far simpler . And I just took a random example because its a common thing that someone would want to do.
Re: PowerShell is open sourced and is available on Linux
#563Earlier quoted context omitted.
The dollar sign is charming. There's a few points here: 1) Not all data is text. In fact, very little of the data people see/work with day-to-day is raw text. It's silly to transform a PNG image into text to be able to pipe it around. (Or to pipe around its filename instead and have a dozen tools all having to open and re-parse it each time.) 2) There's nothing on PowerShell preventing you from serializing a piece of…
Unfortunately PowerShell relies on everything running on .NET (well, I think COM works, too); the idea of a shell that can expose live objects is useful, but PowerShell's platform limitations in reality doing that make it a far from ideal implementation of that concept. Something built on a protocol that is platform agnostic would be better.
If you’ll wrap your objects into some platform-agnostic protocol like JSON, you gonna waste enormous amount of CPU time parsing/formatting those streams at the object’s boundaries.
Re: PowerShell is open sourced and is available on Linux
#564PowerShell is my guilty pleasure of the computing world. Once you've piped strongly-typed objects around between your shell commands, text scraping seems barbaric by comparison. The problem, of course, is that you can't use all that power for much, since the pool of PS-compatible tools and utilities is much shallower than it is for Unix shells. I'm really hoping this will help spur a new wave of PowerShell-compatible…
Along the same lines, for Linux and MacOS: https://github.com/geophile/osh
Re: PowerShell is open sourced and is available on Linux
#565Earlier quoted context omitted.
As a note, there have been strongly-typed shell languages for Unix for some time. Scheme Shell[0], Turtle[1] and TCSH[2] leap to mind; but there's nothing preventing a developer from using Perl, Python, Lisp or any other language that allows itself to accept stdin as an interpreted script. 0: https://scsh.net/ 1: http://www.haskellforall.com/2015/01/use-haskell-for-shell-s... 2: http://www.tcsh.org/Welcome Edit: oh m…
0: scsh is a nice scripting language, however it's not meant for interactive usage (PowerShell is) See: http://www.alphanet.ch/~schinz/scsh-faq/scsh-faq_4.html#SEC3... Scheme is also dynamically typed. 1: It's the first time I see it, but from a cursory glance and some docs ( http://hackage.haskell.org/package/turtle-1.0.0/docs/Turtle-... ) I think it doesn't include simply calling external commands (I couldn't find…
proc and inshell. Did you check out the built-in tutorial?
http://hackage.haskell.org/package/turtle-1.0.0/docs/Turtle-...
Re: PowerShell is open sourced and is available on Linux
#566Earlier quoted context omitted.
There’s more to open-source than license. Such as? You seem to have a mental model of things that make a project objectively open source, that don't include the license. I'd be curious what those things are.
I really don’t, it’s more of a feeling. With an open-source release like .NET it seems more like better documentation. In fact that was the case for early commercial Unixes—you needed the source code to actually use the system, but it wasn’t open-source. Open-source as-documentation (for lack of better term) is still useful. It makes bug fixing a whole lot easier, for one thing. But it’s not quite the same as open-so…
Re: PowerShell is open sourced and is available on Linux
#567Earlier quoted context omitted.
Microsoft operates as though, and under the assumption that their software is needed. It's a faulty premise. The presumption is arrogance incarnate. As a business I can fully, completely operate without any of the their software, profitably, peaceably, and with at least the same amount of friction or less. And more securely. If you think otherwise, you are ignorant of the tools available for free and of some intellig…
As a Windows Sysadmin, my life would be a living hell without PowerShell.
Re: PowerShell is open sourced and is available on Linux
#568PowerShell is my guilty pleasure of the computing world. Once you've piped strongly-typed objects around between your shell commands, text scraping seems barbaric by comparison. The problem, of course, is that you can't use all that power for much, since the pool of PS-compatible tools and utilities is much shallower than it is for Unix shells. I'm really hoping this will help spur a new wave of PowerShell-compatible…
After a number of years using PowerShell, my conclusion is the opposite: text "scraping" is just better for most cases. Normal shell usage means doing a lot of one-shot pipelines incrementally. This is just easier and faster to do when passing text around because you can look at it and not have to inspect some object for it's type and what attributes/methods it provides. Parsing the text is not the problem here (alth…
Re: PowerShell is open sourced and is available on Linux
#569Earlier quoted context omitted.
I find that to be the issue. You are considering it just RAW text when it is actually formatted text that has been parsable for years with common unix command line tools. It not being in the format you consider a structured object does not mean it's not a object or even parsable. If you are using ad hoc regex I suspect you are not using all the tools available to you. I feel like Kernighan and Pike do a much better j…
> You are considering it just RAW text when it is actually formatted text that has been parsable for years with common unix command line tools. Parsing command output with sed/awk/etc (ie. "common unix command line tools") is absolutely an ad hoc parser. Let me give you an example that I recently ran into. I have a tool that parses the output of "readelf -sW", which dumps symbols and their sizes. The output normally…
Re: PowerShell is open sourced and is available on Linux
#570Microsoft is projecting that the .NET ecosystem will become a main revenue driver, regardless of the underlying operating system.
By giving everything away for free? The only related revenue stream M$ seems to have left is Azure with some vague notion that giving away their ecosystem will drive people to use their cloud more