[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: images.png (4 KB, 275x183)
4 KB
4 KB PNG
>2024
>this abomination still reigns supreme in the scripting domain
what went right?
>>
>>100113559
>fast
>easy to learn
>PIPES
>>
just use python.
>>
>>100114722
which version?
>>
>>100114864
3.8 obviously !
>>
>>100114722
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
GenderError: OP is a faggot
>>
>bourne shell continuation
>GNU branding
>plenty of features compared to previous shells
>set as the default interactive shell for basically every distro
>>
>>100113559
what's wrong with it?
>>
>>100113559
Interest on this area died with Docker greatly reducing the amount of shell you've to toich, nobody wants to sponsor or even show mild support to something better like oilsh. Fuck, barely anyone wants to maintain most GNU projects, even.
>>
>>100115305
Have you ever fucking used it at all? What kind of question is that?
>>
>>100115361
>Docker good shell scary
I've never read a more söydev post in my life
>>
>>100115361
>something better like oilsh
how's it better
>>
>>100113559
>still reigns supreme
because you can directly access the command line and do programming at the same time.
>what went right?
no one else has made an alternative that became standard. zsh is basically bash, and Fish is not being adopted.
>>
>>100115433
Sorry i forgot the part i had te power to put a gun on everyone's basedinfused heads and force them to use Docker, tiny oversight. Faggot. Not my fault the shit industry you choose to sponsor is gay.
>>100115447
Better error handling while being 100% compatible and faster, with more features opt-in.
>>
>>100113559
>everything is a string
fvcking sovl
>>
>>100115447
>>100115618
it has this cool magic jump feature no other shell has it
$ cat magicjump.sh
cc -xc - <<EOF
#include <unistd.h>
int main(void) {
lseek(100,100,0);
}
EOF
./a.out
if false; then
echo pwned
exit
fi
$
$ bash magicjump.sh
$ zsh magicjump.sh
$ osh magicjump.sh
pwned
$
>>
>>100113559
>bash still the superior option
>gcc still the superior option
>glibc still the superior option
GNU won
>>
>>100115833
lmfao
I knew the dev was a proper retard from reading his ignorant blogposts, but how does this even happen
>>
File: makeyourterminalsoy.jpg (103 KB, 1280x720)
103 KB
103 KB JPG
>>100113559
>2024
>troons and aspies still suggesting zsh and omz over bash
>has no advantage, is just for them to have their stimmy colors and out of place unicode + nerdfont bullshit
>>
>>100117547
Fuck omz and flashy prompts, I use zsh for the better tab completion and more flexible syntax
>>
>>100114888
obsolete
>>
>>100113857
this, i do things on one line in interactive mode that python babies spend a week writing into a script that's hundreds of lines
and after all that their script is orders of magnitude slower
>>
File: chad_mirror.jpg (106 KB, 1095x1200)
106 KB
106 KB JPG
>>100113559
>what went right?
Everything. Python midwits and Perl mouthbreathers would off themselves if they had any idea what kind of masterpieces can be done with bash.
>>
>>100113559
I can't believe this was made by a nigger
>>
File: Giga.png (2.26 MB, 1280x1710)
2.26 MB
2.26 MB PNG
>>100118232
What did you call me?
>>
>>100118438
>>100118232
thats obviously a south american not african
>>
File: skeletor.gif (551 KB, 500x281)
551 KB
551 KB GIF
Would love to use Python as a bash replacement but ... bash has

* Pipes that aren't a nightmare to write
* 1:1 with actual system commands
* interactive, automated ssh
* all editors highlight your shell scripts.. no dealing with strings containing your commands in python

outweigh the benefits of another language, sadly

Even if I just got reasonable pipes, I'd probably switch, but bash is a huge shortcut when dealing with anything linux
>>
>>100113559
I hate the syntax so fucking much
>>
File: 1711147640726434m.jpg (34 KB, 1024x378)
34 KB
34 KB JPG
>>100119068
>Would love to use Python as a bash replacement
>>
>>100117431
My best guess if that the if statement implicitly checks the result of the previous statement. a.out presumably exits with a non-zero code since it’s lseeking a filedescriptor that hasn’t actually been opened (unless fd 100 Is special somehow), which is typically interpreted in shell scripts as a negative result. So if false is true, because it’s if a.out() == false.

That’s my guess anyway
>>
>>100119605
I think he just means a language where THING=THING doesn't have different behavior than THING = THING
bash has so much retarded infuriating non standard shit like this its a travesty its still used so widely
>>
>>100120077
that shit is literally in the standard thoughbeit
>>
>>100120086
I worded that poorly, of course it's in posix shell standard. I just mean no other programming language is weird and gross like that.
>>
What I don't get is how writing even a trivial Perl script will get shade thrown at you, but absolutely no one will care if you write hundreds of lines of unreadable shell.
>>
>>100119068
>>100120077
powershell is python with piping and interactive ssh.
>>
>>100120976
Powershell is C# with 30 fewer IQ points. It's not Python-ish at all aside from being a dynamically typed interpreted language.
>>
File: file.png (6 KB, 335x63)
6 KB
6 KB PNG
>>100118085
It's C++ of interpreted languages
>>
>>100120988
yeah youre right powershell isnt like python. Python is just overhyped meme garbage that they used to teach to 14 year olds as a joke and powershell will replace it once everyone wakes the fuck up and realises that "le microsoft bad" isnt a valid reason to neglect using a superior solution.
>>
>>100121112
>"le microsoft bad" isnt a valid reason to neglect using a superior solution.
"Microsoft bad" absolutely IS a valid reason to not use something. But even setting that aside, Powershell is just not very good, which is why Winfags have to compare it to bullshit like shell scripting.
>>
>>100113559
Superior shells like Oil aren't packaged for distributions:
https://www.oilshell.org/
>>
>>100121178
I clicked the link and got a motherfucking virus on my computer, yo
not cool
>>
>>100121171
>powershell is not very good
>t. my ass
Literally anything available in the entire .runtime library can be done in powershell.
dont tell me youre one of those faggots that cry about it being too "verbose". Like that even fucking means anything. What is Verb-Noun naming convention too complicated for you? No wait let me guess, you havent written a single line in powershell in your life have you.
>>
>>100121242
Maybe you should get a motherfucking education:
https://www.oilshell.org/blog/2021/01/why-a-new-shell.html

Bash is honestly terrible, it's one saving grace is that it's installed by default. That's it. That's why we use it. Years of
#!/bin/bash
that will never, ever be replaced.
>>
>>100121171
>>100120988
>t. never written a single script in powershell
>>
>>100121247
>Literally anything available in the entire .runtime library can be done in powershell.
Not everyone gives a shit about .NET, believe it or not. No, I don't care that it runs on Linux and is "FOSS".
>dont tell me youre one of those faggots that cry about it being too "verbose". Like that even fucking means anything.
If you are using it interactively, it does in fact matter. Not that Python is much better in this regard.
>No wait let me guess, you havent written a single line in powershell in your life have you.
I have used it out of necessity. It's not 4GL or VBA tier bad, I just don't see why I would use it unless I was doing Windows Server administration.
>>
>>100121271
>I'm still angry, and I don't want you to create a new shell.
lol
alright nigga I'll give it a read
>>
>>100113559
>what went right?
It fucking works, and works very well.
Other open sores freetrooners should take note.
>>
>>100121298
> I just don't see why I would use it unless I was doing Windows Server administration.
I dont see a reason to use python period. Why would I bother to learn a cluster fuck of python modules when I can just use powershell and directly use all of the .NET libraries I already know how to use from C#.
People really love wasting time.
>>
>>100121396
>I already know how to use from C#.
See, this is why these discussions are pointless, .NET fags literally cannot understand that not everyone uses .NET. I doubt most of them even know what most shell scripts are used for (hint: it's not "real" programming).
"Standard" scripting tools are obviously imperfect, but they're ubiquitous, and that's what matters. I think Clojure is nice, but I'm also not a delusional fucking retard who thinks his org is going to install babashka on all of our Linux boxes just because I don't like bash.
>>
>>100121298
>I have used it out of necessity
Copy-pasting a few lines to solve a single problem one time does not count as "used" for the purposes of criticizing it.
Talking down on things you haven't actually used is pretty fuckin gay bro.

As someone who uses powershell a lot, I can think of a lot of legitimate valid criticisms of the language. It's far from perfect, and in some ways its frustrating to work with. But its extremely telling when someone mentions "verbosity" as a criticism, because thats such a glowing indicator for "ive never used this, but Ive pasted a snippet before and it looked gross when i tried to proofread it"
>>
>>100121727
>let me just ignore the second line of your reply
Why do I even bother trying to engage with Wintoddlers like a rational adult?
>>
>>100113559
It's only really superior because it's available everywhere and it's good enough to do basic tasks. It's much harder to learn to do Bash well than learning one of the good alternatives (e.g. rc), but you can share the program with anyone and they'll be able to run it. It has no real competitor in that area, since composing command-line programs is significantly more complicated in Python and Perl.
>>
Others have more or less said this, but "good enough" is the king of adoption worldwide, not just in tech. There are almost certainly a number of alternatives, but they weren't so much better that it was worth having to adopt a new one and then have to deal with backwards compatibility with all the bash that already exists. This happens with every major programming language. Even in the US, they started to adopt the metric system but then gave up because it was too slow and expensive of a process. Of course, now it would be even harder to change everything out for metric, so the momentum is even higher to not switch.
Bash will stay until someone invents an alternative to Linux, or at least a new distro, that is significantly better enough that people are willing to pay the price of adoption. If that new OS defaults to something other than bash, people will suck it up and learn it in order to stay consistent with that new standard. For what it's worth, while Apple drives me nuts, I do like that they try and force people into the future sometimes. I think they default to zsh, right? I haven't used it, but assume it's better than bash.
>>
>>100122043
>since composing command-line programs is significantly more complicated in Python and Perl.
Both Python and Perl have decent standard libraries for making CLI tools. Though yes, there are plenty of situations in which a shell script is the saner option.
>>
>>100122234
Not for creating CLI tools but for composing existing one, like
foo | grep 'b[^a]*r' | tr a-z A-Z | baz
being a dozen lines in proper programming languages.
>>
I was lazy to learn how to script and kept typing out elaborate commands to do the things I want. It turns out I was most of the way there by doing that. There are some things about bash scripting that makes it more powerful and useful that I learned after I started making scripts to eliminate all that cuck work.
>>
>>100122326
Oh, true. I'd argue Perl is still better for text processing though I do understand that sending someone a Perl script isn't necessarily a wise decision.
>>
I use bash until the scripts needs to do more than very simple text processing or math.
Never learnt to use awk.
>>
>>100122469
Bash isn't all that good for text processing, except what commands already provide (including something like
perl -pe s/foo/bar/
), but it's great at gluing together program inputs and outputs. There are also many programs that implement functionality that's cumbersome to reimplement using equivalent libraries, so real programming languages require either a lot of work or simply calling an external program like a worse version of a shell scripting language.
>>
>>100113559
replace all bash scripts with guile
>t. has not used guile
>>
the manpage for bash is really great.
>>
>>100119068
>>100120077
Anyone try xonsh for an extended period of time? How is it?

https://xon.sh/contents.html
>>
>>100119729
your guess is wrong
>>
>>100113559
bash and python are the same thing
>>
>>100114888
3.12.3
>>
>>100117547
But I like flashy prompts. Seeing your pwd, virtual envs, current git branch has value
Having the timer is very useful too. Sometimes something happens you didn't anticipate and you need to know how long it took
>>
>>100125518
>Seeing your pwd, virtual envs, current git branch has value
Bash can do this, it's just a few lines in bashrc
>Having the timer is very useful too. Sometimes something happens you didn't anticipate and you need to know how long it took
Bash can do this too and tmux does it even better
>>
>>100125541
>Bash can do it
Did I say otherwise?
>>
>>100125574
yes, you did
>>
>>100125760
Bash can do stimmy colors and nerdfont, brother
>>
>>100113559
Bash is not an abomination, it's extremely good for a shell, surprisingly good actually.
>>
>>100125541
zsh is way easier to tweak thoughever and has zle for making fancier features
>>
>>100125783
I don't find bash hard to tweak, anything I want for a shell to do bash does and I don't need bloat like ohmyzsh.
>>
>>100114888
>3.8
>post number is triple eights
Confirmed.
>>
>>100117739
actually it's oldest release still officially supported.
>>
>>100114722
>bro just bring in gigabytes of dependencies and fire up a massive bloated interpreter runtime just to run a few shells commands
>>
File: 1703282836994447.png (28 KB, 469x900)
28 KB
28 KB PNG
>Oh My Zsh!
>>
>>100122326
baz map { tr/a-z/A-Z/r } grep { /b[^a]*r/ } foo
>>
>>100113559
>still reigns supreme
from 1990 up until 2010 bash was completely forgotten and people used Perl, it's only recently that bash became as popular as it is
>>
>>100127944
bash 4 came out in 2009
>>
>>100127944
isn't it called raku now?
>>
>>100128069
no
>>100128066
I don't see how it's relevant
>>
>>100115419
Yeah, I use it all the time. The onus is on you to support your claim. So go ahead.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.