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

Programmer Humor

21016 readers
946 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
[–] SpaceNoodle@lemmy.world 7 points 2 days ago (3 children)

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

[–] SwordInStone@lemmy.world 4 points 1 day ago

interns be interning

[–] T156@lemmy.world 5 points 1 day ago (2 children)

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

[–] SpaceNoodle@lemmy.world 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.

[–] Akito@lemmy.zip 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.

[–] pelya@lemmy.world 4 points 2 days ago (1 children)

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

[–] SpaceNoodle@lemmy.world 8 points 1 day ago (1 children)
[–] synae@lemmy.sdf.org 11 points 1 day ago (1 children)

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.