How do you propose zcat tell the difference between an uncompressed file and a corrupted compressed file? Or are you saying if it doesn’t recognize it as compressed, just dump the source file regardless? Because that could be annoying.
What even is plain text anymore? If you mean ASCII, ok, but that leaves out a lot. Should it include a minimal utf-8 detector? Utf-16? The latest goofy encoding? Should zcat duplicate the functionality of file? Generally, unix-like commands do one thing, and do it well, combining multiple functions is frowned upon.
I wouldn’t call all this hoop jumping to reading common log files “doing it better”.
This is exactly the kind of arcane tinkering that makes everything a tedious time wasting chore on linux.
At this point it’s accepted that text files get zipped and that should be handled transparently and not be precious about kilobits of logic storage as if we were still stuck on a 80386 with 4 megs of ram.
How do you propose zcat tell the difference between an uncompressed file and a corrupted compressed file? Or are you saying if it doesn’t recognize it as compressed, just dump the source file regardless? Because that could be annoying.
Even a corrupt compressed files has a very different structure relative to plain text. “file” already has the code to detect exactly which.
Still, failing on corrupted compression instead of failing on plaintext would be an improvement.
What even is plain text anymore? If you mean ASCII, ok, but that leaves out a lot. Should it include a minimal utf-8 detector? Utf-16? The latest goofy encoding? Should zcat duplicate the functionality of file? Generally, unix-like commands do one thing, and do it well, combining multiple functions is frowned upon.
I wouldn’t call all this hoop jumping to reading common log files “doing it better”.
This is exactly the kind of arcane tinkering that makes everything a tedious time wasting chore on linux.
At this point it’s accepted that text files get zipped and that should be handled transparently and not be precious about kilobits of logic storage as if we were still stuck on a 80386 with 4 megs of ram.