Tag Info

Hot answers tagged

3

They are not the same. -print primary is always evaluated as true and causes the current pathname to be written to standard output. When you use: \( -type f -a -print -a -iname '*.mp3' \) All files found will be printed to stdout, it's the default behavior of -print, regardless of -iname '*.mp3' expression is true or false. When you use: \( -type f -a ...


2

and and or are not commutative in many programming languages e.g. C, C++, C♯, shells, find, and many more. They use lazy left to right evaluated i.e. it evaluates the term on the left first, and then only evaluates term on right if it needs to. So in false and b, b is not evaluated as the answer is always false. But in b and false, b is evaluated, as it has ...



Only top voted, non community-wiki answers of a minimum length are eligible