DEV Community

Cover image for ⚠️ Don't try this at home: A CMS written in Bash ONLY??

⚠️ Don't try this at home: A CMS written in Bash ONLY??

Pascal Thormeier on September 03, 2023

Here we go again. After building an image modal with CSS only (and completely neglecting accessibility (sorry, @grahamthedev)) and an attempt to e...
Collapse
 
yjdoc2 profile image
YJDoc2

A great article as always! My condolences for you must have had to go through in order to complete the article. That said, this was a very fun and educative read.

Bash works very much like quantum physics: One does not understand Bash; one gets used to it.

I think it also applies that

..if you understand QM, then you don't understand QM...

to bash 😉

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you! Yeah, I've lost a few braincells during this, which isbthe exact reason I didn't care about security; The complexity would be unbearable.

Bash is interesting in that regard: There's a gazillion ways of doing the exact same thing, so once you think you've figured out how to do a thing, the next SO post you look at will do it entirely different with no apparent reason. I'm just happy that Bash doesn't rely on probabilities under the hood.

Collapse
 
yjdoc2 profile image
YJDoc2

Thankfully bash doesn't play dice, even if it feels like that too often :p

Collapse
 
cicirello profile image
Vincent A. Cicirello

This is awesome. My favorite post on DEV for the past couple weeks.

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you so much, glad you liked it!

Collapse
 
grahamthedev profile image
GrahamTheDev

lmfao, I love this.

I see I am not the only one on a run of "abusing the internet"!

I can't wait to see what you do next...mine is "Conway's game of life in pure HTML"! 😂💗💗

Collapse
 
thormeier profile image
Pascal Thormeier

Let's see what my brain decides to come up with next, I usually have little to no control over my creative impulses :D

Conway's game of life in pure HTML sounds complex as anything, very much looking forward to that!

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard • Edited

I feel like when I was a child and my mother told me an incredible but plausible horror story to teach me something valuable.
Yeah, very impressive.
Yeah, don't do this at home !
In general don't use Bash except when someone else is maintaining it.

Collapse
 
thormeier profile image
Pascal Thormeier

Haha, I can relate to that one :D One can do incredible things with Bash (as this post hopefully showcases) and knowimg it to some degree helps a lot, especially in a DevOps setup. I've seen countless deployment scripts using it, Bash is just so convenient. However, just because it's possible to build large-scale applications with Bash, doesn't mean we should build them. :)

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard • Edited

For my own sanity, any non trivial Bash script is too much bash script.
As soon as I see an if statement, or a loop, or a function,
I give up Bash and use $favoriteProgrammingLanguage instead.

Collapse
 
j471n profile image
Jatin Sharma

Didn't see that coming 😂

Collapse
 
thormeier profile image
Pascal Thormeier • Edited

To be honest, neither did I, a month ago. It's just amazing how fast dumb ideas can come to life!

Collapse
 
bogomil profile image
Bogomil Shopov - Бого

That's neat!

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you!

Collapse
 
whyafan profile image
Afan Khan

I saw the title and I knew this was going to be one hell of a ride.

Great one, Pascal.

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you so much! Glad you liked it! For some reason, most of my "Don't try this at home" posts turn out to be quite the adventure. At least in development, unchartered land tends to be fun :D

Collapse
 
slimgee profile image
Given Ncube

Now that's what I call a crazy idea!!

Collapse
 
thormeier profile image
Pascal Thormeier

Crazy indeed, but hey, at least it's possible :D

Collapse
 
lumen profile image
Lumen Lohn Freitas

I think I should suggest my bank to use this server.

Great article by the way!

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you, so glad you liked it! The question is, though, what's worse: COBOL or Bash, right? :D

Collapse
 
aboucodeur profile image
aboucodeur

Yes i like it

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you so much!

Collapse
 
sm0ke profile image
Sm0ke

great content. Ty!

Collapse
 
thormeier profile image
Pascal Thormeier

You're very welcome, glad you liked it!

Collapse
 
tonyjoe profile image
Tony Joe Dev

It is so crazy! GREAT! 😃

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you, glad you liked it!

Collapse
 
alnahian2003 profile image
Al Nahian

is this some kinda black magic? 🤯

Collapse
 
thormeier profile image
Pascal Thormeier

Nope, Bash only, the next best thing to black magic! 😅