this post was submitted on 24 Mar 2025
31 points (100.0% liked)

Linux Questions

1545 readers
5 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] gratux@lemmy.blahaj.zone 31 points 1 week ago (5 children)

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 5 points 1 week 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 4 points 1 week ago (1 children)

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.

[–] possiblylinux127@lemmy.zip 7 points 1 week ago (1 children)

Unless you are on a Linux box

[–] nazgul666@lemmy.world 1 points 1 week ago

Yes sure! Unfortunately most companies which I work for (insurance and banks mostly) still use windows quite often...

[–] haroldfinch@feddit.nl 1 points 1 week 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.

[–] GissaMittJobb@lemmy.ml 1 points 1 week ago

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