help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird interaction between builtin cat and trap


From: Chet Ramey
Subject: Re: weird interaction between builtin cat and trap
Date: Fri, 15 Apr 2022 09:33:55 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/14/22 6:08 PM, Peng Yu wrote:

Shouldn't you make the builtin cat behave the same as the external
cat?

It already doesn't: it has no options and I'm uninterested in adding any.

I'd expect the built-in command to be a drop-in replacement of
the corresponding external command, as using builtin is to speed up
the bash program but not to change its behavior.

In most cases, where the behavior is standardized, that's the case, but I
wrote the builtin cat as an homage to Pike's "cat -v considered harmful"
paper (http://harmful.cat-v.org/cat-v/unix_prog_design.pdf).


https://simplicable.com/new/bug-vs-feature
- Bug: Something that can be reasonably viewed as a problem based on
current requirements....
- Feature: Something that hasn't been requested in current requirements....

According to the above definition of bug vs feature, it should be
considered as a bug meaning the behavior is not consistent with the
corresponding external program.

You presume too much about the "current requirements."

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]