▲ 1673 ▼ Like programming in bash (lemmy.ml) submitted 2 years ago by cm0002@lemmy.world to c/programmer_humor@programming.dev 185 comments fedilink hide all child comments
[–] T156@lemmy.world 8 points 2 years ago (1 child) Bash substitution is regex-level wizardry. permalink fedilink source hideshow 2 child comments replies: [–] SpaceNoodle@lemmy.world 7 points 2 years ago (3 children) Slapping a $ before an environment variable name is "wizardry?" permalink fedilink source parent hideshow 6 child comments replies: [–] T156@lemmy.world 5 points 2 years ago (2 children) Not quite that, but more the ${variable##.*} sort of thing. permalink fedilink source parent hideshow 4 child comments replies: [–] SpaceNoodle@lemmy.world 4 points 2 years 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. permalink fedilink source parent [–] Akito@lemmy.zip 1 point 2 years 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. permalink fedilink source parent [–] SwordInStone@lemmy.world 4 points 2 years ago interns be interning permalink fedilink source parent [–] pelya@lemmy.world 4 points 2 years ago (1 child) Nope, the whole ${variable/regex/replacement} syntax permalink fedilink source parent hideshow 2 child comments replies: [–] SpaceNoodle@lemmy.world 8 points 2 years ago (1 child) All the string manipulation functions are easy: https://tldp.org/LDP/abs/html/string-manipulation.html permalink fedilink source parent hideshow 2 child comments replies: [–] synae@lemmy.sdf.org 11 points 2 years ago (1 child) This one is my bookmark https://tldp.org/LDP/abs/html/parameter-substitution.html permalink fedilink source parent hideshow 2 child comments replies: [–] scaredoftrumpwinning@lemmy.world 3 points 2 years 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. permalink fedilink source parent
[–] SpaceNoodle@lemmy.world 7 points 2 years ago (3 children) Slapping a $ before an environment variable name is "wizardry?" permalink fedilink source parent hideshow 6 child comments replies: [–] T156@lemmy.world 5 points 2 years ago (2 children) Not quite that, but more the ${variable##.*} sort of thing. permalink fedilink source parent hideshow 4 child comments replies: [–] SpaceNoodle@lemmy.world 4 points 2 years 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. permalink fedilink source parent [–] Akito@lemmy.zip 1 point 2 years 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. permalink fedilink source parent [–] SwordInStone@lemmy.world 4 points 2 years ago interns be interning permalink fedilink source parent [–] pelya@lemmy.world 4 points 2 years ago (1 child) Nope, the whole ${variable/regex/replacement} syntax permalink fedilink source parent hideshow 2 child comments replies: [–] SpaceNoodle@lemmy.world 8 points 2 years ago (1 child) All the string manipulation functions are easy: https://tldp.org/LDP/abs/html/string-manipulation.html permalink fedilink source parent hideshow 2 child comments replies: [–] synae@lemmy.sdf.org 11 points 2 years ago (1 child) This one is my bookmark https://tldp.org/LDP/abs/html/parameter-substitution.html permalink fedilink source parent hideshow 2 child comments replies: [–] scaredoftrumpwinning@lemmy.world 3 points 2 years 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. permalink fedilink source parent
[–] T156@lemmy.world 5 points 2 years ago (2 children) Not quite that, but more the ${variable##.*} sort of thing. permalink fedilink source parent hideshow 4 child comments replies: [–] SpaceNoodle@lemmy.world 4 points 2 years 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. permalink fedilink source parent [–] Akito@lemmy.zip 1 point 2 years 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. permalink fedilink source parent
[–] SpaceNoodle@lemmy.world 4 points 2 years 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. permalink fedilink source parent
[–] Akito@lemmy.zip 1 point 2 years 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. permalink fedilink source parent
[–] SwordInStone@lemmy.world 4 points 2 years ago interns be interning permalink fedilink source parent
[–] pelya@lemmy.world 4 points 2 years ago (1 child) Nope, the whole ${variable/regex/replacement} syntax permalink fedilink source parent hideshow 2 child comments replies: [–] SpaceNoodle@lemmy.world 8 points 2 years ago (1 child) All the string manipulation functions are easy: https://tldp.org/LDP/abs/html/string-manipulation.html permalink fedilink source parent hideshow 2 child comments replies: [–] synae@lemmy.sdf.org 11 points 2 years ago (1 child) This one is my bookmark https://tldp.org/LDP/abs/html/parameter-substitution.html permalink fedilink source parent hideshow 2 child comments replies: [–] scaredoftrumpwinning@lemmy.world 3 points 2 years 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. permalink fedilink source parent
[–] SpaceNoodle@lemmy.world 8 points 2 years ago (1 child) All the string manipulation functions are easy: https://tldp.org/LDP/abs/html/string-manipulation.html permalink fedilink source parent hideshow 2 child comments replies: [–] synae@lemmy.sdf.org 11 points 2 years ago (1 child) This one is my bookmark https://tldp.org/LDP/abs/html/parameter-substitution.html permalink fedilink source parent hideshow 2 child comments replies: [–] scaredoftrumpwinning@lemmy.world 3 points 2 years 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. permalink fedilink source parent
[–] synae@lemmy.sdf.org 11 points 2 years ago (1 child) This one is my bookmark https://tldp.org/LDP/abs/html/parameter-substitution.html permalink fedilink source parent hideshow 2 child comments replies: [–] scaredoftrumpwinning@lemmy.world 3 points 2 years 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. permalink fedilink source parent
[–] scaredoftrumpwinning@lemmy.world 3 points 2 years 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. permalink fedilink source parent