SQLServerCentral Editorial

Unix vs PowerShell

,

I saw an article on using awk, sed, and grep on Linux. I used to know how to use those, though I was by no means an expert. However, working with a stream of text with an input and output was a valuable skill I've used over and over in my career. There are plenty of times when I've needed to handle a long set of text, and my practice with Unix in university helped me a lot. I've only lightly needed to use Perl and regex in my career, but I was glad I had some idea of what I was doing.

In the last few years, I've spent quite a bit of time working with PowerShell (PoSh) instead of text-based utilities. While I found some of the design cumbersome and unintuitive, overall, the idea of working with objects instead of a stream of text is really nice.

PowerShell was devised to get around some of the complexities of these utilities. It was built to be an integrated shell, with lots of improvements on the way one might use the utilities above in a bash or Korn shell. While it can take a bit of getting used to, in many ways, I do think it's superior to the old paradigm of chaining together lots of utilities.

What's more, it's fairly easy to enhance PoSh with your own routines, and many vendors have taken advantage of this to provide APIs and interfaces with their tools. Plenty of corporate Ops and IT departments have done the same thing, publishing routines that anyone in their organization can expect to exist and use.

I loved Unix, way more than DOS in most ways when I was in university. If I'd been a decade younger, I might have even evolved into Linux and pursued a career in that environment. These days, with plenty of MS software, including SQL Server, moving to Linux, I'm happy to change to that platform. However, with PoSh being available cross platform, I think I'd be looking to use PowerShell as my shell and scripting platform of choice, even on Linux.

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating