Search code examples
bashosx-snow-leopard

verbose declare -x from .bashrc


After using Migration Assistant (on OS X) to copy my files form a case sensitive file partition to a case insensitive file partition, my .bashrc has become verbose each time it is run.

#!/bin/bash
#.bashrc file
alias ls='ls -G'
alias sbrc='source ~/.bashrc'
export GNUTERM=x11
export NWCHEM_TOP=~/install/nwchem-6.0-binary
export
PATH = /opt/local/bin:$PATH
...

The output is now

Last login: Mon Apr 30 11:33:33 on ttys005
declare -x Apple_PubSub_Socket_Render="/tmp/launch-oblOxq/Render"
declare -x COMMAND_MODE="unix2003"
declare -x DISPLAY="/tmp/launch-VdU1C8/org.x:0"
declare -x GNUTERM="x11"
...
vencen@dirac:~$

How can I silence bash?


Solution

  • Somehow my .bashrc file received an extra newline character leaving an isolated export

    #!/bin/bash
    export
    PATH=/opt/local/bin:$PATH
    #...
    

    The correct file

    #!/bin/bash
    export PATH=/opt/local/bin:$PATH
    #...
    

    does not generate the unwanted output, typing export on the command line does.