I have used bash, zsh, ksh, and now powershell. I am by no means an expert on UNIX shells. I could get all my work done on any one of these. My main shell is Zsh with some oh-my-zsh plugins because I’m lazy. What can you do in powershell that you can’t do in any other shell? Also, does the shell you use even matter? Sorry if this is a dumb question.

  • Victoria
    link
    fedilink
    English
    arrow-up
    30
    ·
    4 days ago

    My current stance is that if your task is complex enough to require the advanced features powershell offers, it should probably just use Python or similar programming languages instead of a shell script. Hell, I’d even argue that is almost exactly what Python is for: it is simple to hack something together while offering powerful stuff in its standard library and common packages.

    • nesc@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 days ago

      PS has a lot of utilities built-in, so you can do a lot with it especially if you know it enough. But python is a lot more accessible (and available almost everywhere by default) so yeah.

    • nazgul666@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 days ago

      From an enterprise IT stance I’d disagree. For phython you need an interpreter, while powershell is available on every random windows 20xx server. It is far easier to do this task in PS than requesting the python interpreter to be installed on the machine and then doing it in python.

    • GissaMittJobb@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 days ago

      My favourite for writing ‘advanced’ scripts is Ruby. It’s highly ergonomic for this kind of thing, with its backtick-feature.

    • Harold@feddit.nl
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 days ago

      I went through the comments to check if someone hadn’t already mentioned exactly this. Here you go.

      I have used PowerShell since its inception, and still believe that the Monad manifesto is very relevant. However in recent years I have switched to Python for this same reason.

      It’s more widely available, especially outside of Windows it already has greater support for advanced features. PowerShell is not a first class contemporary to Python on Linux.

      Quite easy to learn. A lot of default learn materials, tutorials, examples.

      You’ll also be able to find people in market with Python experience more readily (especially going forward) if you need to hire talent for your company.