3 ms·
Parentheses launch a subshell, so you probably want to use accolades instead: {[ -f a ] && [ -f b ] ;} || { [ -f c ] && [ -f d ] ;}
by dolmen 6y ago
Parentheses launch a subshell, so you probably want to use accolades instead:
{[ -f a ] && [ -f b ] ;} || { [ -f c ] && [ -f d ] ;}
- dataflow 6y agoWith braces I'd prefer the test syntax actually, this is too many special characters to be comfortably readable for me. And yes I know it creates subshells, that was precisely what I was saying in my comment where I said the simplest syntax I could think of (i.e. that very code) creates subshells.