Why was this garbage ever considered acceptable?

Attached: bash.jpg (800x450, 22K)

Other urls found in this thread:

zwischenzugs.com/2018/01/06/ten-things-i-wish-id-known-about-bash/
mywiki.wooledge.org/BashPitfalls
gitlab.redox-os.org/redox-os/ion
doc.redox-os.org/ion-manual/html/
twitter.com/SFWRedditVideos

Go back to the reddit

Literally what's wrong with bash?

It's not zsh.

bloat

the actual commands, not much. But the conditionals and such are pure cancer, didn't leave a space between the brace and the if? Doesn't recongize it. and then the regular expressions in that if statement don't match, when they should, because fuck you. Not to mention having to do all the stupid parenthesis and shit around variables.

Attached: cope.jpg (405x205, 28K)

x=5
echo $x
Wow that was hard fuckboi.
Wanna compare numbers? use (( and ))
Wanna compare strings? use [[ and ]]
There is nothing hard like you make it seem. You are just not able to write clean code, that is all.
>no space after "if".
You are just a noob at the moment.

Jesus fucking ass christ
is it a pasta? Because it's a pasta now, saved.

The version that comes with Apple products is very outdated

Writing working bash is easy. Writing correct bash is too tricky for most people. It's an inconsistent extension to an already shitty language.
You'll write something like `[ $x == foo ]` or `optipng *.png` and it'll work fine until it gets some unusual input and all the abstractions collapse.
Bourne shell (and to some extent Unix) is fundamentally perverse, as is reflected in the source code of the original. There are pitfalls in any language, but this one has more than most.

Attached: macros.png (871x913, 65K)

ask anyone in IT and they will always give you the same answer...INDUSTRY STANDARD

Bourne shell and Bash were good in their day (70s and 80s) but a better shell came along in the 90s which is zsh and got ignored because people blindly use what everyone else uses

Try simple arithmetic like "x + 1 / 2". Oops, doesn't work, better pipe it to bc and deal with the weird syntax if we want to keep only the int part or format to a specific number of digits.

Zsh is worse. Use a proper shell like dash.

zsh is dogshit. Slow, buggy, no actual feature advantage over bash. Fish is much better but it's also buggy and its completion and reverse searches are crap so you're still left with bash. Never tried ksh or csh though.

zsh inherits Bourne sh's problems and doesn't add enough value over bash.
fish is a step in the right direction, more so than you'd expect from something that brands itself as interactive. oil might end up being good.
Any shell that's compatible with sh is automatically broken.

scripting with bash is a nightmare.
rc has a way saner syntax

also rc+9term is the most flexible cli environment

>zsh is slow
>fish is much better

My biggest gripe is the lack of floating point arithmetic support.

>using apple products
I think you have bigger problem than old bash

>Apple can't update their shit
>It's bash fault

>Literally what's wrong with bash?
zwischenzugs.com/2018/01/06/ten-things-i-wish-id-known-about-bash/

mywiki.wooledge.org/BashPitfalls

Thanks fren, this is pretty much exactly what I was looking for.

Attached: Butterfly.jpg (867x685, 362K)

Ok Mr. Smartypants

Attached: quotesRimportant.png (1564x103, 17K)

the example of that user is still correct
But true if your shit contains spaces it may be interpreted. As in other languages $foo could also be a function, which is possible in bash too.
You can also just write $foo if you want to call it. I use this quit a lot.

On *BSD? Never.

Aren't they switching to zhs in the lastest release? And I hardly see why that's the fault of bash...

Big mega chad shell coming through
gitlab.redox-os.org/redox-os/ion

Attached: gigachad.jpg (1068x601, 56K)

Seeing how they avoid newer versions due to a license change, it is very much Bash's fault.

BP > Shell

this actually looks very good, not half assed and backwards compatible like zsh

much improved syntax and doesnt even need to rely on string utilities like sed and awk

doc.redox-os.org/ion-manual/html/
>Ion is a modern system shell that features a simple, yet powerful, syntax. It is written entirely in Rust, which greatly increases the overall quality and security of the shell, eliminating the possibilities of a ShellShock-like vulnerability, and making development easier. It also offers a level of performance that exceeds that of Dash, when taking advantage of Ion's features.

>It also offers a level of performance that exceeds that of Dash
damn! Can anyone prove this?

No, it's apple's fault. The reason they dislike the license is because of the patent clause. I have no respect for a company that intends to sue me for patent infringement just for using a shell.

csh is the worst in mu opinion.

when Linus made the mistake of using GNU instead of BSD

Attached: 1518818756367.png (1279x837, 580K)

I'm not talking about the license.
And nice blog screenshot retard

he's referring to userspace utilities

Reminder

Attached: prot.png (556x466, 95K)

what are you niggas' thoughts on powershell

it's pure botnet

Reposting I have to disagree with this. Bash is so bad that nobody wants to use it in any regard, it exists solely for legal and legacy reasons.
As an interpreter it's slower than the shell it's derived from (Bourne) and it's alternative (Almquist). It's so slow that distros had to reimpliment ash just like they did for sh in the first place (as dash).
The extensions are not worthy of note or use compared to other shells, again so unworthy of importance that it's possible for distros to replace the default sh interpreter as dash which lacks those extensions
as an interactive shell there's no real reason to use it either, shells that are older than it are both faster and have better unique syntax/features and the same is true for shells made after it.
The one and only reason bash exists is because GNU obviously couldn't use the original bourne shell because of the license. And it only exists today because it was the default for so long.

For scripts people target bourne and run in a bourne compatible shell. For interactive I legitimately see anything other than bash, most people I know today are using fish and zsh, some use ksh, I use tcsh, and some people even swear by powershell (because it's object pipeline is unique and can be sensible).

I have never once seen anyone speak well of bash specifically, anything good said about it is inherited from bourne.

>Bash is so bad that nobody wants to use it in any regard
I do.

I'm gonna beat you up.

*blocks your path*

Attached: PowerShell_5.0_icon.png (256x256, 8K)

What about dash?

its just a fast implementation of the Bourne shell

I don't like bash, but it's the most portable option if you need more features than POSIX sh provides. Having written tens of thousands of lines of bash, I can handle various pitfalls, but it often gets really clunky to deal with the more convoluted ones. I wouldn't mind using rc or something modern and experimental like oh, but then no one could run the programs.

Attached: 1537831265334.png (905x3601, 348K)

I WAS ONLY KIDDING

I'm interested in hearing from rc users. If anyone does, please tell me good and bad things about it.
>oh
Neat. I need to try this.

Apple also symlinks gcc to clang, and they are not even fully compatible. I had issues with that and i was wondering what was wrong until i noticed it was using clang

Ahh now that's the refreshing taste of GPL/Freedom™ we can all* enjoy.
*except people who disagree with my philosophy

This is both disgusting and glorious

Any1 got any bash pro tips??

What is your specific issue with bash?

Make use of declare, unset and local, when working on longer scripts.

Shell scripting is always awful. Use a proper scripting language.

Use it to invoke a language designed to be a scripting language instead of a shell that happens to be scriptable.

This whole thread is actually a poor quality bait. If it's not the person who posted it has no idea what a shell is supposed to be.

Is there a language that’s like an interpreted C/C++ with the possibility of manual dynamic memory allocation, and objects?

I use Fish shell :^)

>scripting language with manual memory management
That's a bit far.

$ ls
foot.c foot.h foot.o toe.c toe.o
$ rm * .o
rm: .o: No such file or directory
$ ls
$

The shell is genuinely the least important part of your installation. Spending a lot of time in the shell is basically just a way to signal that you're not doing anything important.

add a space to a path and see how many people forget to quote them

>generalization
You're a bad person.

This is a design error, sure, but what’s the reasonable alternative?

What about rc?

>rm *[space].o
well no shit, the wild card already matched everything in the directory.

>what is a headless server

Sounds like a problem with apple

>what are background processes

its a shell language in the Plan9 OS that was to be like Bourne shell but with cleaner and simpler syntax

dont feed the trustfund baby posting from Starbucks

not having * expand to "everything in this directory" while also expanding to the regex .*

So why don't any distros ship with that?

>>>/sqt/

I didnt say its Bourne shell compatible, I said its has syntax similar to Bourne shell

They bankroll clang's and they want ot to replace GCC everywhere because they don't like the new opensource licenses

Unironically my go-to language for most problems I face.

>bloat
>botnet
>unsafe
take your pick

based

Apparently its easier to learn BASH than to learn how to install any other shell.

>INDUSTRY STANDARD
What fucking industry? The LINUX industry? The Shit-imitation-of-Unix industry?
The I'm too stupid to figure out any other shit industry?

"Bash" is a troubling word that can trigger some people.

>The Shit-imitation-of-Unix industry?
most jej

>microsoft paid shill: BASH IS GARBAGE
>also microsoft; HERE INSTALL GNU + BASH ON WINDOWS 10 FOR FREE
You guys need to learn to communicate your trolling more effectively.
Also, get the fuck out. WHEN WILL WE BAN MS IP RANGE

You miss my point, for text manipulation and one off commands, it's awesome. For scripting, it's a god damn nightmare. Powershell >>>>>>>>>>>>Bash in that regard.

Yes and? Its a known trade off not explicitly a downside

>It's not fish
Fixed.

nice troll with that space after the wildcard. I nearly fell for it.

For me? It's Ion shell combined with Alacritty.

>2020
>not using a REPL of your favorite language.

Because C is even worse for scripting. Thank Unix for this brain damage.

Based "let's avoid all compatibility problems by never using anything other than one language" Lisp weenie

Just use python or perl you autist

How does using C and Bash instead mitigate compatibility problems? For one, it introduces an additional incompatibility between scripts and the implementation of individual commands, which are now forced to communicate via plain text, parsing and serializing it every time.

Python is better than all shell scripting languages
And I hate python