"If it's still regularily used, it's not old. It's stable and sustainable"

#timeless #stable #computing #linux #foss

And #bash knowhow is very useful on many many setups and even "embedded" devices.

I love that even my gaming handheld #R36S supports #bash (over #SSH).

https://handhelds.wiki/R36S

@p3ter your Android runs my mksh as its /system/bin/sh :p

No need for GNU bash.

@p3ter
"Look what they need to mimic a fraction of our power"

@p3ter Bash forver!!!
Some of my best programs are written in bash

Pure poetry

@p3ter

"That's what she said..."

@p3ter very early morn coffee and read when i scroll by ur post, so yeah, Hulk BASH

@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.

@p3ter I don't even recognize any of that lol

@30p87

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?

@p3ter The dirs containing PKBUILDS and additional files for random services running on my server (kg-gruppenplan for instance being a small custom service for a local club). The main point was running powershell, though

@30p87 "powershell"? now you've confused me completely.

Windows PowerShell?

@p3ter Yes, Windows PowerShell. Which, unfortunately, is also available on Linux.

@30p87 interesting...

I just couldn't imagine the use case for PS on Linux. Which is...?

@p3ter Masochism.
@30p87 seriously: whatfor would anyone need PS, if they have GNU/FOSS tools at hand out-of-the-box anyways โ“ โ“ โ“
@p3ter Because some may prefer that. If that sounds stupid and illogical to you: Remember that Windows exists, which is even more stupid and illogical.

@p3ter @30p87

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.

@isotopp @p3ter @30p87 yup. A LOT of effort has been spent on making sure .NET runs and runs correctly and well on pretty much everything.
And I really do mean everything.
FreeBSD? Yep. NetBSD? Why not. Alpine on aarch64? Definitely. s390x? Sure. AIX? Uh-huh.
But Solaris? You'd have to pay me.
@isotopp @p3ter @30p87 wow, and they managed to ship all those hypothetical benefits only 3+ decades after Linux shell interpreters proliferated?
I'm sure the 15 Linux users who are easily led by armchair reasoning will be very pleased with it indeed ๐Ÿ˜‚

@ham_sando @p3ter @30p87

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".

@isotopp @p3ter @30p87 lol I know it was released in 2006, early Unix shells were released 30 years earlier in the 1970s.
Also just FYI I'm genuinely uninterested in the history of Microsoft or anything they do lol
@p3ter Reminds me of the fable about the Fox and the Crow.

@p3ter It's all we ever needed.

https://github.com/p8952/bocker
Bocker: Docker implemented in around 100 lines of bash.

GitHub - p8952/bocker: Docker implemented in around 100 lines of bash

Docker implemented in around 100 lines of bash. Contribute to p8952/bocker development by creating an account on GitHub.

GitHub

@p3ter
From Bjarne Stroustrup's C++ FAQ:
What is "legacy code"?
[...] "Legacy code" often differs from its suggested alternative by actually working and scaling.

https://www.stroustrup.com/bs_faq.html#legacy

Stroustrup: FAQ

@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.

@p3ter brings back vague suppressed memories of quote trauma.

@p3ter

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.

@p3ter @quixoticgeek As long as everyone knows what and where the scripts are and they have been touched by someone who still works there:)

@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

@mgleadow @p3ter @quixoticgeek how did I know someone would say this? Yes, of course it is true. But saying it is less funny.
@hardingar @p3ter @quixoticgeek Still not a guarantee - I have scripts that were apparently written by myself that baffle me now
@p3ter I feel so seen, amazing

@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.

@OmegaPolice @p3ter perdonally I'd wish I could migrate to #fish but sadly #bash is the shit that's preinstalled with every #distro I've to take care of at #wรถrk!
@p3ter Bash is so powerful. I've got a half a dozen or more that I've written and stuck in cron.daily, cron.weekly, etc. to make backups, install updates and all sorts of things. Even my off site backup, which I do manually, is mostly a bash script that I wrote that does a lot of the work for me and just prompts me to confirm certain things before continuing. And it's literally just one plain text file that does everything on its own with the built in core utils that ship with Debian, ๐Ÿ™‚
@p3ter but bash on its own is completely useless, its only useful by whatever set of utilities are installed on your computer.
@p3ter I still don't know what Kubernetes is supposed to be
@p3ter @bsdphk as someone who hacked together fish scripts to parse JSON as strings, I feel seen.
@p3ter yeah... Good luck with implementing a zero downtime update strategy with a solid rollback function of your scalable services in pure bash.
I'm not a "cloud native" Fanboy but this is comparing a truck full of apples with a handful of oranges.
@p3ter if your bash scripts (and python scripts and go bits and..) evolved to the level of a small kubernetesy thing, does this still count? 
misc-scripts/bash at master ยท kkarhan/misc-scripts

random scripts for various admin tasks. Contribute to kkarhan/misc-scripts development by creating an account on GitHub.

GitHub