Maja changed the topic of ##bash-crimes to: we bash back | club of folks preoccupied in whether they could, not whether they should | logs https://libera.irclog.whitequark.org/~h~bash-crimes
duckl1ng has quit [Quit: Changing server]
whitequark[cis] has joined ##bash-crimes
<whitequark[cis]> what's a good way to strip -Wl,--start-group and -Wl,--end-group in a shell script wrapping clang?
<misentropy> args=$@;args=${args/-Wl,--start-group/};args=${args/-Wl,--end-group/};clang ${args}
<whitequark[cis]> does that work correctly if you have spaces inside arguments?
<misentropy> eh, seems to do its thing inside the for loop
<JAA> This is ##bash-crimes, so [ with -o seems appropriate indeed.
<whitequark[cis]> is that bad?
<whitequark[cis]> i just look at man [ whenever i need to use it and then do whatever it says on the first relevant line I see
<misentropy> if it works and doesn't error out on weird edgecases then it works
<misentropy> just taking a different approach
<JAA> I think it's mostly about portability. If you always use Bash, it's less of a concern. But then you might as well use [[ and || and not have to worry about weird edge cases.
<whitequark[cis]> oh, i literally need this to run on github actions runners and nowhere else
<whitequark[cis]> I never looked up what [[ does
<whitequark[cis]> man [[ returns nothing and man bash is a long-ass document that's annoying to search
<JAA> It's like test/[ but bash-specific and less annoying.
<JAA> Actually not quite Bash-specific, but not widely portable.
<JAA> Also can do some things [ can't.
<whitequark[cis]> thanks
cryne7 has quit [Quit: Bye!]
cryne7 has joined ##bash-crimes
duckl1ng has joined ##bash-crimes