[Top][All Lists]

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

Re: When "set -u", "which" outputs environment: line 1: _declare: unboun

From: Chet Ramey
Subject: Re: When "set -u", "which" outputs environment: line 1: _declare: unbound
Date: Fri, 9 Apr 2021 16:36:40 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0

On 4/9/21 3:08 PM, Craig Andrews wrote:

Bash Version: 5.1
Patch Level: 0
Release Status: release

        With "set -u", invoking "which" results in the output of: environment: line 1: _declare: unboundvariable         That should not happen, and does not happen, with prior versions of bash.
         I'm using Fedora 34 (beta).

         Run this shell script:
         set -u
         echo "$(which bash)"

`which' is not a bash builtin. It's probably a shell function that gets
loaded from one of your startup files.

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