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.
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.
Bash substitution is regex-level wizardry.
Slapping a $ before an environment variable name is “wizardry?”
interns be interning
Not quite that, but more the
${variable##.*}
sort of thing.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.
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.
Nope, the whole
${variable/regex/replacement}
syntaxAll the string manipulation functions are easy: https://tldp.org/LDP/abs/html/string-manipulation.html
This one is my bookmark
https://tldp.org/LDP/abs/html/parameter-substitution.html
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.