Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An empty file is not hard to make. It's just a matter of creating the file and not writing to it.


Yes obviously. But the POSIX specification for a "text file" as above is that it contains characters, which an empty file by definition does not. So an empty file cannot be a text file if you read that specification strictly, and therefore you cannot have zero lines in a text file. As soon as you have a single character there is at least one line, and the amount of lines can only stay the same or grow from there.

The definition should read "one or more lines" instead or (probably better) specify that a text file contains "zero or more characters".


Ahh I see what you're saying. I misunderstood at first.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: