Upvote!
  • 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.67K

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

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

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

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

      • SpaceNoodle@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        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
        arrow-up
        3
        arrow-down
        2
        ·
        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.

    • SwordInStone@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      2 months ago

      interns be interning

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

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

      • SpaceNoodle@lemmy.world
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        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
          11
          ·
          2 months ago

          This one is my bookmark

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

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

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.

  • 1.19K users / day
  • 4.56K users / week
  • 9.25K users / month
  • 17.8K users / 6 months
  • 1 local subscriber
  • 23.1K subscribers
  • 1.31K Posts
  • 43.1K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org