That's my point. -z is looking for a zero byte file, but 'no content' could be a bunch of tabs and spaces.
[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
I put some spaces into a formerly empty file and now it has a size of 15.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|