What acid_kewpie said. The old brackets are not really designed for complex evaluations. If you must use them, however, use multiple individual tests instead of
-a/-o.
Code:
if [ "$size" -ge 3145728 ] && { [ "$fileID" -ne 1234 ] || [ "$fileID" -ne 2345 ]; }; then
The newer double-bracket test is much more robust and convenient when it comes to complex conditions. You can more easily do expression grouping, for one thing.
Code:
if [[ "$size" -ge 3145728 && ( "$fileID" -ne 1234 || "$fileID" -ne 2345 ) ]]; then
But actually, when you're doing integer comparisons like this,
arithmetic evaluation brackets are even better.
Code:
if (( size >= 3145728 && ( fileID != 1234 || fileID != 2345 ) )); then
This still may not be the best solution, though. It depends on how you're generating the input list of course, but I would personally see if I could eliminate one of the conditions from the input itself during that or some other earlier step, if possible.