11 ms·
"It takes practice and repetition like with most programming languages. " Except with Bash it really isn't worth it. Learning PowerShell is much better for lon
by HyperSane 4y ago
"It takes practice and repetition like with most programming languages. "
Except with Bash it really isn't worth it. Learning PowerShell is much better for long scripts.
- redox99 4y agoPowerShell might be better, but it won't be already installed in your typical Linux environment.
- supernovae 4y agodnf install powershell
- loloquwowndueo 4y agoYou can put that in a bash script because guess what - bash is already there ;)
- tolciho 4y ago$ bash /bin/ksh: bash: not found strike one... $ pkglocate powershell | grep \^power $ strike two...
- hulitu 4y agodnf: Bad command or file name :)
- selfhoster11 4y agoThat's not "already installed"
- supernovae 4y agodoes it really matter? no.. absolutely not.
- noncoml 4y agoSome arguments would be nice…
- Supermancho 4y agoDiscussions about syntax devolve rather quickly into arguing about sources, because there are so few studies done and everyone has an opinion (or cause). Bash syntax is horrid and that's enough for me. Just wait a couple decades and languages slowly improve or they die. Sometimes it takes a long time (in comparison to a person's lifespan) and that's ok.
- deleted 4y ago[deleted]
- bscphil 4y agoEven giving an opinion would be something. What's something you like better about PowerShell? I can easily say something I dislike about it: This form `Verb-LongNoun` for function names used in PS is somewhere between alien and maddening. It's difficult to type, difficult to remember, and isn't an obvious improvement over `lowercasename` which is typical of basically every other shell. I guess the idea is that you don't have to worry about naming collisions with programs in your path? That's never been an issue for me when writing shell scripts though, not even once.
- vips7L 4y agoYou don’t have to use Verb-LongNoun. PowerShell will fuzzy match as long as it’s not ambiguous. Verb-L might be enough. If you’re in an interactive shell they’re already aliased to shorter forms like “gal” for Get-Alias or “gci” for Get-ChildItem. I’m not OP but things I like about PowerShell: - Objects instead of text - The entire C# std lib is accessible - One tool with the same UX vs several different tools with different UX.
- wruza 4y agoWow, your first paragraph alone is why I’ll never even touch PS.
- loloquwowndueo 4y ago“Really isn’t worth it” - hearsay. It totally is. Also - power shell is better for long scripts, you say, but what are you going to use for short ones? I’m not buying what you’re selling tbh.
- HyperSane 4y ago" hearsay. It totally is." No it is an opinion, and IMHO the RoI for time invested in learning bash is far less than Python or Powershell.
- hdjjhhvvhga 4y agoI'm not sure if it's sarcasm but in case you are serious, Unix shell has been around for over 50 years and its variants are installed on millions systems around the world, and it's still the fastest way to accomplish simple tasks on these servers. PowerShell is something vastly different.
- smcameron 4y agoYou're out of your f'n mind.