1

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?

4

2 回答 2

2

不知何故,我的.bashrc文件收到了一个额外的换行符,留下了一个孤立的export

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

正确的文件

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

不会生成不需要的输出,export在命令行上键入会生成。

于 2012-05-01T03:48:13.657 回答
1

不确定这是否是问题所在,但我见过迁移助手离开您的主目录不归您的用户帐户所有的情况。相反,您的用户帐户通过 ACL 被授予所有通常的访问权限。您可以检查并尝试修复它,看看是否可以解决问题。

去检查:ls -lde ~

修理:

sudo chown -R `id -u`:`id -g` ~
于 2012-05-01T00:18:14.303 回答