bug-bash
[Top][All Lists]
Advanced

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

Re: declare -F incorrect line number


From: Chet Ramey
Subject: Re: declare -F incorrect line number
Date: Thu, 6 Oct 2022 10:29:11 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

On 10/5/22 6:29 PM, Robert Elz wrote:
     Date:        Wed, 5 Oct 2022 15:36:55 -0400
     From:        Chet Ramey <chet.ramey@case.edu>
     Message-ID:  <3d89acac-4c0a-64c9-e22c-1a3ca68600d1@case.edu>

   | Other than that, there's no advantage.

There can be.   I have, on occasion (not in bash - I don't
write bash scripts) had a need to redefine one of the standard
commands, while executing a particular function (which calls other
more standard functions which run the command) - and define the
same command differently when running a different function, which
runs the same standard functions running the command, but in a
different way.

Sure, that's the conditional definition I talked about in my first reply.
The OP indicated that that wasn't his goal.

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