Get the latest tech news

PowerShell: The object-oriented shell you didn't know you needed


Microsoft’s modern shell is much better than Unix sh.

For example, the alternate ways to group photos in multiple subdirectories we’ve explored above involve a call to a static method of the .NET System.IO.Path class. Sometimes, things will work out in the end (since many cmdlets are happy to get either as inputs), but sometimes, PowerShell must be asked to stop this madness and return an array:@(Get-ChildItem).Length. While it does have some warts, it is more powerful than your usual Unix shell, and its strongly-typed, object-oriented code beats stringly-typed sh spaghetti any day.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of PowerShell

PowerShell

Photo of Object

Object

Photo of oriented shell

oriented shell

Related news:

News photo

What if null was an Object in Java?

News photo

Tiny11 Builder trims Windows 11 fat with PowerShell script

News photo

Tiny11 Builder trims Windows 11 fat with PowerShell script