Skip to main content
added 74 characters in body
Source Link

Why not this?

[[ ! ( -f file1 && -f file2 && -f file3 ) ]]

Numerical example:

i=1
j=-1
[[ ! ( i -eq 1 && j -eq -1 ) ]]
echo $?

Output:

1

In the other three combinations of i and j, the output is:

0

Why not this?

i=1
j=-1
[[ ! ( i -eq 1 && j -eq -1 ) ]]
echo $?

Output:

1

In the other three combinations of i and j, the output is:

0

Why not this?

[[ ! ( -f file1 && -f file2 && -f file3 ) ]]

Numerical example:

i=1
j=-1
[[ ! ( i -eq 1 && j -eq -1 ) ]]
echo $?

Output:

1

In the other three combinations of i and j, the output is:

0
Source Link

Why not this?

i=1
j=-1
[[ ! ( i -eq 1 && j -eq -1 ) ]]
echo $?

Output:

1

In the other three combinations of i and j, the output is:

0