Am I missing something?
foo | not
...looks better than this to me:
#!/bin/sh
if [[ `foo` ]]; then
exit 1
else
exit 0
fi
Conversation
Replying to
yes, you're looking for "!" (e.g. ! false && echo foo, but it also works for return: ! return 1)
a notable exception would be exit, but there you can do "exit $?"
1
hmm not all of this syntax seems to be portable - but should solve most of your problems
Replying to
"!" is what I thought... I tried to negate grep's return with this:
git bisect run test [!`grep 'foo' test.txt`]
But no luck.
1
Replying to
I'm not sure if you even want backquotes here - but try sh -c? as in
git bisect run sh -c '! return 0'

