Silver's Home
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@zephyr@lemmy.world to Programming@programming.dev • 2 years ago

How do you shell expand your variables and why?

lemmy.world

message-square
35
fedilink
64

How do you shell expand your variables and why?

lemmy.world

@zephyr@lemmy.world to Programming@programming.dev • 2 years ago
message-square
35
fedilink
  • @bloopernova@programming.dev
    link
    fedilink
    English
    13•
    edit-2
    2 years ago

    This is the best way. It’s also the way the Shellcheck wants sometimes recommends.

    • thingsiplay
      link
      fedilink
      8•2 years ago

      @bloopernova As you mention it, here the links for anyone interested: Online tool https://www.shellcheck.net/ and you can install it locally too https://github.com/koalaman/shellcheck .

      • @hascat@programming.dev
        link
        fedilink
        English
        4•2 years ago

        While this looks like a handy tool, it does make me think shell scripting itself needs a cleaner approach than what we have currently.

        • thingsiplay
          link
          fedilink
          1•2 years ago

          deleted by creator

    • Gamma
      link
      fedilink
      English
      6•
      edit-2
      2 years ago

      This isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.

      • @bloopernova@programming.dev
        link
        fedilink
        English
        3•2 years ago

        Oh! I didn’t know that (um, obviously lol)

        I’ll edit my comment.

Programming@programming.dev

!programming@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: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 379 users / day
  • 776 users / week
  • 2.44K users / month
  • 7.67K users / 6 months
  • 21.4K subscribers
  • 2.24K Posts
  • 34.2K Comments
  • Modlog
  • mods:
  • snowe
  • Ategon
  • @MaungaHikoi@lemmy.nz
  • @UlrikHD@programming.dev
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org