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

          • lazynooblet@lazysoci.al
            link
            fedilink
            English
            arrow-up
            0
            arrow-down
            1
            ·
            13 days ago

            I’ve been a Linux sysadmin for decades and Windows for the year 8 years or so. I started using Windows with an air of contempt, and still do. I hate myself for saying this, but Powershell is better than bash. Bash is very limited if you consider only bash. For bash to be useful you need the entire GNU suite with grep, cut, awk etc.

            • porl@lemmy.world
              link
              fedilink
              English
              arrow-up
              3
              ·
              12 days ago

              But that’s almost never how a system is configured. The entire point is that bash, zsh, fish etc. can make use of those utilities. You don’t need bash trying to reinvent everything. You don’t want that. That’s why changing shells is generally painless and a strength, not a weakness.

            • Phoenixz@lemmy.ca
              link
              fedilink
              arrow-up
              2
              ·
              12 days ago

              That’s like saying that your car is very limited because you need cylinders, spark plugs, oil filters…

              Well yeah, you do and typically that comes with the car, just like grep comes with bash

            • ILikeBoobies@lemmy.ca
              link
              fedilink
              arrow-up
              2
              arrow-down
              1
              ·
              12 days ago

              So you’re saying Powershell doesn’t uphold Unix Philosophy and thus shouldn’t be used?

    • brian@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      13 days ago

      there are other shells that have all the nice powershell things without the weird stuff (at least for not windows people), like nushell

      although I wouldn’t be surprised if powershell was the thing that started the trend of better shells

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        12 days ago

        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.