Pricefield | Lemmy
  • 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

message-square
185
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
1.68K

Like programming in bash

lemmy.ml

@cm0002@lemmy.world to Programmer Humor@programming.dev • 2 months ago
message-square
185
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • @T156@lemmy.world
    link
    fedilink
    English
    9•2 months ago

    Bash substitution is regex-level wizardry.

    • @SpaceNoodle@lemmy.world
      link
      fedilink
      7•2 months ago

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

      • @SwordInStone@lemmy.world
        link
        fedilink
        5•2 months ago

        interns be interning

      • pelya
        link
        fedilink
        4•2 months ago

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

        • @SpaceNoodle@lemmy.world
          link
          fedilink
          9•2 months ago

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

          • synae[he/him]
            link
            fedilink
            English
            11•2 months ago

            This one is my bookmark

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

            • @scaredoftrumpwinning@lemmy.world
              link
              fedilink
              3•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.

      • @T156@lemmy.world
        link
        fedilink
        English
        5•2 months ago

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

        • @SpaceNoodle@lemmy.world
          link
          fedilink
          5•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.

        • @Akito@lemmy.zip
          link
          fedilink
          English
          3•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.

Programmer Humor@programming.dev

!programmer_humor@programming.dev
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
  • 109 users / day
  • 352 users / week
  • 1.03K users / month
  • 3.82K users / 6 months
  • 3 subscribers
  • 1.43K Posts
  • 50.5K Comments
  • Modlog
  • mods:
  • Feyter
  • adr1an
  • @BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org