On 10/27/17 10:53 AM, Eduardo Bustamante wrote: > On Fri, Oct 27, 2017 at 1:21 AM, Boruch Baum <boruch_b...@gmx.com> wrote: >> In Debian, using Bash version 4.4, path level 12, I've set a DEBUG trap >> in my .bashrc and tried running the following command, with the >> following output resulting. The five lines between the command being run >> by fc and that command's output, is the text of the DEBUG trap. > > Here's a short reproducer:
Bash enables the verbose option while running the commands `fc' specifies for execution, since the historical practice is to echo the commands before they get executed. Bash doesn't turn off the verbose option while running trap commands (though it could; ksh93 does), so the trap commands get echoed as well. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/