|
lesstjm is asking how to make sure a file is not zero bytes. I think he wants to test actual file content, in which case he will want the -s option. But since the sample code used a variable, that leaves the door open to the other interpretation of wanting to test content of the variable instead of the file it references.
So just to clarify, -s will test the file itself for content, and -z and -n will test the contents of the variable.
|