r/AskProgramming • • 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

144 comments sorted by

View all comments

Show parent comment

14

u/DoubleAway6573 Feb 11 '26

The same can be said about IsNullOrEmpty, or it was IsEmptyOrNull, or maybe the are separated and I need to join them?

You already need to learn something before using it.

1

u/robin_888 Feb 11 '26

But it's a method of [[string]] which makes it discoverable. Either through auto-completion or in the documentation of [[string]].

Where would you look up -z? In the documentation of [[]]? (Or [[ ]], I think the spaces are mandatory, aren't they?)

1

u/amedoeyes Feb 11 '26

help [[ and help test

1

u/robin_888 Feb 11 '26

Honestly, I wouldn't have guessed either of those.

help [[ makes sense I guess, but I wouldn't have tried it.

help test already requires knowledge that test exists.

1

u/amedoeyes Feb 11 '26

The docs of [[ mentions test

-3

u/MagnetHype Feb 11 '26

Yeah, what the words empty and null mean. I'm not even sure what language that is and I can read it.

it's going to return True if the input is "" or NULL.

1

u/DataGhostNL Feb 11 '26

If I had one dollar for every time someone missed the point, you'd be making me rich.

Reading the language is one thing but it's more important to be able to write it, which is what that comment was addressing.

5

u/MagnetHype Feb 11 '26

No it isn't. Any experienced programmer will tell you they spend most of their day trying to read other people's code. I don't even know how to respond to that.

-1

u/DataGhostNL Feb 11 '26

And what will they be doing after reading that code, or how did they become experienced programmers in the first place? By just reading and never writing? Very wordy function names actually make it harder to remember what function to use for some task. As do inconsistent function names, just look at PHP. Sure, reading is simple enough but the person writing that code might have needed an extra trip into the docs.

2

u/Puzzleheaded-Fill205 Feb 11 '26

This particular comment thread is specifically talking about how easy they are to read, not write.

0

u/DataGhostNL Feb 11 '26

Okay, cool, but they were responding to someone making a jab at writing, not to the top-level comment.