Johannes!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 2 months ago

Like programming in bash

lemmy.ml

external-link
message-square
166
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
1
external-link

Like programming in bash

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 2 months ago
message-square
166
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • T156@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    Bash substitution is regex-level wizardry.

    • SpaceNoodle@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      Slapping a $ before an environment variable name is “wizardry?”

      • T156@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 months ago

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

        • Akito@lemmy.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 months 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.

        • SpaceNoodle@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          2 months 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.

      • pelya@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

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

        • SpaceNoodle@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          2 months ago

          All the string manipulation functions are easy: https://tldp.org/LDP/abs/html/string-manipulation.html

          • synae[he/him]@lemmy.sdf.org
            link
            fedilink
            English
            arrow-up
            0
            ·
            2 months ago

            This one is my bookmark

            https://tldp.org/LDP/abs/html/parameter-substitution.html

            • scaredoftrumpwinning@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              2 months 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.

      • SwordInStone@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        interns be interning

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 60 users / day
  • 433 users / week
  • 1.06K users / month
  • 3.72K users / 6 months
  • 0 local subscribers
  • 23.3K subscribers
  • 822 Posts
  • 14.9K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org