Hacker News new | ask | show | jobs
by thomashabets2 44 days ago
I am not the parent commenter, but I have the same sense that the GNU ones are better.

But the only concrete example I can think of is that `cat -n a b`, if `a` doesn't end in a newline, produces something that is obviously not what the user wanted. GNU cat does it right.

I didn't report it to the openbsd people because I didn't want them to yell at me that `-n` is nonstandard anyway with no "right" behavior, so I should STFU. Which would be what I'd expect from having reported problems in the past.

1 comments

I think the behavior in the GNU clone is more consistent with "we added line numbers to the concatenation tool" while whoever added it to OpenBSD's ancestry was probably more concerned with generating listings for printing.

Personally, I'd remove even the POSIX [-u] flag from all cat versions because all of them are un-UNIX-like.

Some GNU tools are particularly ridiculous with the Easter egg features I only know about because LLMs use them all the time —and I have been using Linux for 30 years.

> whoever added it to OpenBSD's ancestry was probably more concerned with generating listings for printing.

The restarting of the counter on OpenBSD is not what concerns me. The merging of the first file's last line with the second file's first line is.

Because you don't like the design(I don't either) but it carries information.

Someone could have thought it was a good idea and no one was willing to audit all of UCB's scripts to fix the "bug" even if it had been the result of a lazy implementation because ed(1) on a terminal.

My choice of wording is from my assumption that nobody, at any point, actually wanted that behaviour. And I stand by that being a pretty safe bet.

So I wouldn't refer to it as "the design". It's not that the methods are unsound, it's that I don't see any method at all.

As for not wanting to break existing scripts, OpenBSD is not even remotely as concerned about backwards compatibility as Linux is. I don't mean that in a derogatory way. It's a perfectly cromulent choice.