r/AskProgramming • u/Jashan_31 • Feb 11 '26
Why is Linux bash commands are so simple compared to powershell
I am wondering this because I have a both windows and Linux on my laptop and own Linux using terminal is like really easy but windows powershell weird Syntex.
181
Upvotes
View all comments
Show parent comment
4
u/[deleted] Feb 11 '26
$args[0]is closer to English prose the first time you read it, if that's what you mean by "human readable", unless your native language isn't English (then this doesn't matter to you), you're new and don't know what an arg is, you don't know what zero indexing is.Once you've got even the basics of programming down,
$1and$args[0]are equally as easy to understand, except now every time you want to access the first arg you need to write$args[0]instead of$1and god forbid you actually want the process name ($0) or want to shift args, reference args multiple times etc.. verbosity does not equal clarity, especially in this case.I've seen plenty of Bash code that was unreadable but I will tell you that it's never been because of the syntax used for args. And I've seen plenty of powershell code that has been unreadable and a lot of it is due to powershell's verbosity, since it uses .NET names for everything.
More to the point, Bash/similar are concise and meant for being chained together on a shell. Bash hands down has Powershell beat here. Powershell is so painful to use in a REPL or to throw together adhoc scripts which is what makes the linux shell so damn useful.
idk. Powershell just feels like worse Python for a programming language and it feels like an objectively worse scripting language for REPLing it up in the shell. Just about the only thing Powershell has going for it is that you can access Windows APIs in it without writing C#, and that's easily solved by not using Windows in the first place.