CGI in Bash

Bash scripts don't get enough love around these parts so I made a surprisingly useful CGI program in Bash. Link below. Feel free to bash the refresh button (pun intended).

Trump Timer

🦎 bluesman

May 22 · 5 months ago · 👍 stack, sugar, clseibold, RubyMaelstrom

12 Comments ↓

👽 spc476 · May 22 at 08:34:

You might want to check your Bash CGI scripts aren't subject to shellshock.

— Shellshock

🦎 bluesman [OP] · May 22 at 14:03:

@spc476 Thanks for the reminder. It looks like this was patched long ago. I'm thinking about reworking it so users can create their own timers. I probably wouldn't use Bash for that. I wrote a 3D Tic Tac Toe game a few weeks back. It's written in Java but compiled to native code with GraalVM (using the Epsilon no-op garbage collecter). An odd but perfect use case for CGI - especially if you're an old-timer into old-timey languages.

💎 pista · May 22 at 16:33:

Two days until 1337.

🚀 RubyMaelstrom · May 22 at 18:39:

I literally just wrote a CGI program using Bash yesterday for a web project I needed something quick and easy for. Works just fine!

🦎 bluesman [OP] · May 22 at 21:54:

@RubyMaelstrom I've seen some crazy Bash scripts in my day. Whatever works!

🚀 stack · May 22 at 21:58:

Add another two terms for Vance, and maybe then DNC will run someone who could win?

🦎 bluesman [OP] · May 22 at 23:56:

@stack Dems have been massively overperforming in special elections (including one just this week) but okay. You know, the countdown timer is also for people who will be heartbroken to see him fly off into the sunset in his Qatari jet.

🚀 jsreed5 · May 23 at 10:57:

Fun fact: I usually write the CGI scripts for my capsule in Python, but my OEIS Gemini mirror is written in Bash. I don't know enough about indexes to make a database query run fast enough, so to search for sequences, I just use grep!

🦎 bluesman [OP] · May 23 at 14:01:

@jsreed5 That's great! Since logging in to my Google VM is a pain on PCs without the GCP client installed, I use Bash CGI scripts (restricted to my cert) to access (and grep) log and health info via Gemini.

🚀 stack · May 23 at 14:48:

A lot of trust rebuilding, which has not yet started, will be required after the scandals of the last regime are over, which are not... before we se a left- leaninig POTUS. I am not very excited about what happens when your timer counts 0....

❤️ sugar · May 23 at 16:00:

I love bash! When I maintained a tinylog, my backing cgi scripts were entirely bash!

🪴 mstrmeow · May 26 at 10:21:

hehe lmfao


Source