These are chat archives for fiji/fiji

26th
Apr 2017
Curtis Rueden
@ctrueden
Apr 26 2017 19:50
Aaaaaaand, all the Travis jobs everywhere I made have a serious flaw. https://gist.github.com/ctrueden/ae0f024a0cdf2cb53c915d75b0759553
Philipp Hanslovsky
@hanslovsky
Apr 26 2017 19:55
So the issue is that the short version of cat returns 0? Annoying!
I guess, this would work:
test "condition" && test -e file && cat file || echo no
Nope
not even that
Philipp Hanslovsky
@hanslovsky
Apr 26 2017 20:01
I guess, I understand now why: echo no will be executed in case cat returns with non-zero, and echo returns zero, of course

Maybe his:

test "condition" && test -e file && cat file || echo no && test 1 -eq 2

At which point the original code with if then else seems way morereadable