In the comments section of a recent post I found out that Windows PowerShell had been ported to Linux. Had no clue it was a thing.
Went looking and found this old article attempting to explain why they did it. Not remotely interested in giving up Bash for PowerShell, but I thought it was interesting enough to share. The article seems to be from 2016.
I have never been more tempted to check the NSFW box, but I’ll leave it open for now unless a mod complains. :-D
I can maybe chime in since I’ve used both. Basic operations like if statements, arithmetic and loops are a lot closer to what you’d expect on PS. The barrier to programming in bash vs PS is IMO a bit higher because bash heavily uses symbols for everything. This does make PS way more verbose but more easy to wrap your head around it when unfamiliar with the syntax.
I prefer bash but for anything bigger than 5 lines I prefer proper scripting language like python or js and making an alias for “node path/to/js/script.js” and using execSync(“program param1 param2”) to run shell commands.
Long story short, I prefer bash because it’s built in and I know it better than PS, I expect PS guys to feel the same way.