That's my point. -z is looking for a zero byte file, but 'no content' could be a bunch of tabs and spaces.
I put some spaces into a formerly empty file and now it has a size of 15.[forda@hqnagtl1 ~]$ touch emptytest1 [forda@hqnagtl1 ~]$ touch emptytest2 [forda@hqnagtl1 ~]$ ls -l emptytest* -rw-rw-r-- 1 forda forda 0 Oct 22 17:19 emptytest1 -rw-rw-r-- 1 forda forda 0 Oct 22 17:19 emptytest2 [forda@hqnagtl1 ~]$ echo ' ' >> emptytest2 [forda@hqnagtl1 ~]$ ls -l emptytest* -rw-rw-r-- 1 forda forda 0 Oct 22 17:19 emptytest1 -rw-rw-r-- 1 forda forda 15 Oct 22 17:20 emptytest2
non-Perl: Andy Ford
In reply to Re^3: selcting a specific file
by andyford
in thread selcting a specific file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |