this post was submitted on 13 Oct 2023
459 points (100.0% liked)

196

16511 readers
2202 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] aluminium@lemmy.world 27 points 1 year ago (24 children)

Powershell is actually powerful. You can write full on WPF grafical user interfaces with it.

[–] themoonisacheese@sh.itjust.works 37 points 1 year ago (18 children)

If powershell wasn't a Microsoft product I think it could easily outclass any shell currently available. The concept of command output typing is hand down one of the best features of any shell I've tried.

[–] Ozzy@lemmy.ml 1 points 1 year ago (3 children)

I'm confused by this command output typing you're talking about, and I'm not sure if I found the correct thing. Are you talking about the Write-Host and Write-Output?

[–] FooBarrington@lemmy.world 9 points 1 year ago

I'd assume they mean that command return values can have types besides string. In classical shells, all data is stringy, so every command has to re-interpret everything. PowerShell can actually use data types.

In powershell, commands may return types different from string and other commands may accept arguments that are not strings. For example, you can pass an array between commands where in bash you just have a string with \n separated values. You may also interact with more complex objects

I once made a script for a monitoring software that takes its input as json, so I built a custom object that had all the data and then called .tojson on it and that was that.

[–] lameJake@feddit.de 2 points 1 year ago

As far as I understand it it's like stdout and stderr but with some additional ones for debuging, logging, etc..

load more comments (14 replies)
load more comments (19 replies)