There is one difference:
If you don't check for errors, errors (incl non-existent files) being returned by -s will be mistaken as empty file.
If you don't check for errors, errors (incl non-existent files) being returned by -z will be mistaken as non-empty file.
In reply to Re^3: -s testing for empty file; works on local, but not on remote
by ikegami
in thread -s testing for empty file; works on local, but not on remote
by Jeri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |