"If it's still regularily used, it's not old. It's stable and sustainable"
"If it's still regularily used, it's not old. It's stable and sustainable"
@p3ter your Android runs my mksh as its /system/bin/sh :p
No need for GNU bash.
@p3ter Bash forver!!!
Some of my best programs are written in bash
Pure poetry
"That's what she said..."
@p3ter oh I can relate to this. I was doing a kubernetes thing and there were all these tricky technologies to figure out for deploying. But I could do everything I needed in bash, and I already knew bash. So I did.
Tbf, I'm not that fond of bash syntax, but I do like that it is right there and mostly easy.
@rogerparkinson yep, I admit: after 20y of bash I still have to look up some syntax myself ;)
Compared to .bat - it's the most consistent and beautiful language of all times ๐
Yeah "it's right there and mostly easy" - and had *no disrupting UPDATE changes* for several decades is a major PLUS! ๐ฐ
@rogerparkinson @p3ter
To add to the alt text: the people are walking away from a "big box" store or warehouse, towards the car park.
The tray is a large one, with strong wheels, and it's very full.
A detail that jumped out at me: one of the boxes is definitely too big for the tray. We don't know exactly how big it is, because it's also too big for the image. It has the Kubernetes logo on it.
You will sooner or later run into 'bash' one day... One way or another ๐
@p3ter Well...
(now I need to sanitize my Arch, after running that filth...)
@30p87 'kg-gruppenplan'?
What are those files?
@30p87 "powershell"? now you've confused me completely.
Windows PowerShell?
@30p87 interesting...
I just couldn't imagine the use case for PS on Linux. Which is...?
bash uses pipes. Pipes work by taking internal data structures of one program, serializing them, pushing them into a bytestream, and reparsing them. With luck, the serialized output is actually parseable, for example json. On a bad day, the output is "ls -l" and you need a file date.
Powershell creates in-memory C# objects, and passes them around between the tools that make up the script. Additional tools can be added, by writing them in C# and importing C# assemblies, making them callable.
All in all, this has the potential to be faster, more controlled, have better error handling and better extensibility. Even on Linux.
Powershell was conceived and released in 2006, almost 20 years ago. It is not a new thing.
Microsoft bought Hotmail (in 1997, at the height of the Dotcom boom, for a smooth 400M USD), a freemail service based on IMAP/POP servers running von FreeBSD.
Microsoft tried to migrate it to Windows, and failed doing that, twice (started in 1999, and still not succeeded in 2002). Windows at that time was not automatable in a way that allowed it to host Internet Services at scale (nor even run headless).
A lot of the modern Windows automation infrastructure was conceived to remedy that problem, among them Powershell. That did work. The Windows Tools for Unix also had their origin partly in this migration.
Today, Hotmail is "Outlook.com".
@p3ter It's all we ever needed.
https://github.com/p8952/bocker
Bocker: Docker implemented in around 100 lines of bash.
@p3ter
From Bjarne Stroustrup's C++ FAQ:
What is "legacy code"?
[...] "Legacy code" often differs from its suggested alternative by actually working and scaling.
@p3ter Let's say Python and we're talking.
Disclosure: I am much too dependent on several of my bash scripts where there several known breakpoints due to well known limitations of bash programming.
One is limited to code on a single box, is unable to list all dependencies, will break if BSD make instead of GNU make or BSD sed instead of GNU sed is installed, cannot handle filenames with spaces, newlines or quotes in the name, has no monitoring, metrics or error recovery, and is mostly single threaded.
The other is a system that drives a cluster of multiple or hundreds of machines with thousands of cores, installs dependencies reliably and can list them, has defined interfaces, and actually has mechanisms to handle input and output reliably. It also has probes, error handling, metrics and debugging, and also accounting. It also is parallel and capable of actually utilizing modern hardware to the fullest. And it cleans up after itself, after the work is done, the code and all dependencies are removed automatically and completely.
@hardingar @p3ter @quixoticgeek this is equally true of a complex build chain built from modern "self documenting" building blocks
If it isn't used regularly you don't know that it works. Configuration as code suffers from code rot too
@p3ter Bash is the lawful evil idiot in the party of ~~programming~~ unix interface languages, and that counts for something these days.
Still, by my guess it's mostly still around because nobody understands it well enough to replace all but the most trivial scripts.
