Hacker News new | ask | show | jobs
by goatinaboat 2262 days ago
The real difference is: in any reasonable bash script there will be a significant amount of awk, cut, tr and other commands to munge the output of one command into the input expected by the next. In PowerShell that totally goes away.
5 comments

In the past 10 years I've noticed a lot of the manipulations I used to do in "awk, cut, tr" etc are baked into bash.
Even so, there is still a lot of text manipulation that you need to do that is simply a distraction from the actual functionality of your script
I would love to see examples please!
Better stated like this: in Powershell you do business stuff 99% of the time, in bash you do it 1% of the time and arbitrary text parsing 99% of the time.

To be more evil, your text parsing wont work on all platforms, and you probably didn't od it right or you need to be Reg Exp master which is something I rarely find even in senior devs.

Well, the real power of PowerShell comes from .NET - there are very few built-ins.
By 'goes away' do you mean you don't need it or there's nothing equivalent?
You don't need it because the output of commands is a stream of objects rather than a stream of text.
nicely said