Re:Linux Bash vs. Windows PowerShell
by goatinaboat on Sunday April 12, 2020 @10:31AM
(#22848482)
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.
[ Parent
| on HN ]
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.
Re:Linux Bash vs. Windows PowerShell
by goatinaboat on Sunday April 12, 2020 @12:57PM
(#22849457)
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
Re:Linux Bash vs. Windows PowerShell
by IggleSniggle on Sunday April 12, 2020 @11:21AM
(#22848782)
I would love to see examples please!
Re:Linux Bash vs. Windows PowerShell
by majkinetor on Sunday April 12, 2020 @11:41AM
(#22848922)
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.
Re:Linux Bash vs. Windows PowerShell
by mannykannot on Sunday April 12, 2020 @10:40AM
(#22848537)
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.