News for hackers. Stuff that matters.
Re:The Beauty of Unix Pipelines by bityard on Thursday June 04, 2020 @05:53PM (#23422358)
> (1) everything is text

Not at all, you can pipe around all the binary you want. Until GNU tar added the 'z' option, the way to extract all files in a tarball was:

`gunzip -c < foo.tar.gz | tar x`

However, "text files" in Unix do have a very specific definition, if you want them to work with standard Unix text manipulation utilities like awk, sed, and diff:

All lines of text end are terminated by a line feed, even the last one.

I can't tell you how many "text files" I run across these days that don't have a trailing newline. It's as bad as mixing tabs and spaces, maybe worse.

There are no comments on this comment yet.