this post was submitted on 05 Mar 2025
1583 points (99.0% liked)

Programmer Humor

21029 readers
1250 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 1 day ago (1 children)

Bash substitution is regex-level wizardry.

[–] [email protected] 7 points 1 day ago (3 children)

Slapping a $ before an environment variable name is "wizardry?"

[–] [email protected] 4 points 1 day ago

interns be interning

[–] [email protected] 5 points 1 day ago (2 children)

Not quite that, but more the ${variable##.*} sort of thing.

[–] [email protected] 4 points 1 day ago

Right, so that's just the string manipulation functions. I already posted a link to the bible for this following a different reply to the same comment to which you replied.

[–] [email protected] 1 points 1 day ago

Back then, a pain in the ass. Nowadays, I just let an AI handle that. I used this crap for years and years and still cannot remember, which symbols you need in which order. And why should I remember? I'm not the computer. The computer should know, not me.

[–] [email protected] 4 points 1 day ago (1 children)

Nope, the whole ${variable/regex/replacement} syntax

[–] [email protected] 8 points 1 day ago (1 children)
[–] [email protected] 11 points 1 day ago (1 children)
[–] [email protected] 3 points 1 day ago

Every time I have to do this I always go here. I can never remember the prefix suffix parts next time I do parameter substitution.