That is gay, it continues evaluating the expressions even if the result is already known so you need to split it into multiple invocations if you don't want to get syntax errors. Thank you for reading my blog post.
@mikuphile
>Binary -a and -o are ambiguous. Use 'test EXPR1 && test EXPR2' or 'test EXPR1 || test EXPR2' instead.
reading the manual not even once :l_sure:
@romin
>-a and -o are le ambiguous
How? The author is basically just saying “-a and -o are le bad because… they just are, okay?”.
>Use … instead
That is precisely what I had to do.
>reading the manual
I did help test because I figured that it would be a shell builtin. I saw that there was an “and” operator so I expected it to work properly.
@mikuphile your "work properly" is more like "work like c code does" preconceived brainrot
@romin
I have never counted on c working like that. That is not something that you would see often in c code.
I expect it to work like that because that's how the shell's && and || operators work.
@mikuphile
>I expect it to work like that because that's how the shell's && and || operators work.
very cool now try to evaluate `false && ;` and see what happens :l_sigh:
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.