@zephyr@lemmy.world to Programming@programming.dev • 10 months agoHow do you shell expand your variables and why?lemmy.worldimagemessage-square27fedilinkarrow-up166cross-posted to: shell@programming.dev
arrow-up166imageHow do you shell expand your variables and why?lemmy.world@zephyr@lemmy.world to Programming@programming.dev • 10 months agomessage-square27fedilinkcross-posted to: shell@programming.dev
minus-square@bloopernova@programming.devlinkfedilinkEnglish13•edit-210 months agoThis is the best way. It’s also the way the Shellcheck wants sometimes recommends.
minus-squarethingsiplaylinkfedilink8•10 months 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 .
minus-square@hascat@programming.devlinkfedilinkEnglish4•10 months agoWhile this looks like a handy tool, it does make me think shell scripting itself needs a cleaner approach than what we have currently.
minus-squareGammalinkfedilinkEnglish6•edit-210 months agoThis isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.
minus-square@bloopernova@programming.devlinkfedilinkEnglish4•10 months agoOh! I didn’t know that (um, obviously lol) I’ll edit my comment.
This is the best way. It’s also the way the Shellcheck
wantssometimes recommends.@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 .
While this looks like a handy tool, it does make me think shell scripting itself needs a cleaner approach than what we have currently.
deleted by creator
This isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.
Oh! I didn’t know that (um, obviously lol)
I’ll edit my comment.