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: Mon, 18 Apr 2022 10:43:32 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/15/22 2:38 PM, Peng Yu wrote:



I forgot to mention the exit status. Here are the status of the above command.

$ declare -p PIPESTATUS
declare -a PIPESTATUS=([0]="141" [1]="1" [2]="0")

Here is that of external cat. The error should be catched in the exit
status as 141 instead of printing an error message and return 1.

You know this is the same thing again, right? Why is a particular exit
status a requirement for your use case?

--
``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]