zephyr@lemmy.world to Programming@programming.dev · 1 year agoHow do you shell expand your variables and why?lemmy.worldimagemessage-square27fedilinkarrow-up139arrow-down13
arrow-up136arrow-down1imageHow do you shell expand your variables and why?lemmy.worldzephyr@lemmy.world to Programming@programming.dev · 1 year agomessage-square27fedilink
minus-squarebloopernova@programming.devlinkfedilinkEnglisharrow-up8·edit-21 year agoThis is the best way. It’s also the way the Shellcheck wants sometimes recommends.
minus-squareGamma@programming.devlinkfedilinkEnglisharrow-up6·edit-21 year agoThis isn’t true. Shellcheck doesn’t insist on braces unless it thinks you need them.
minus-squarebloopernova@programming.devlinkfedilinkEnglisharrow-up4arrow-down1·1 year agoOh! I didn’t know that (um, obviously lol) I’ll edit my comment.
minus-squarethingsiplay@kbin.sociallinkfedilinkarrow-up5·1 year 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-squarehascat@programming.devlinkfedilinkEnglisharrow-up4·1 year agoWhile this looks like a handy tool, it does make me think shell scripting itself needs a cleaner approach than what we have currently.
This is the best way. It’s also the way the Shellcheck
wantssometimes recommends.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.
@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