English 中文(简体)
在澳门为太平洋建筑工程添加名录
原标题:Adding directory to PATH on Mac
  • 时间:2012-12-23 05:47:59
  •  标签:
  • macos
  • bash

我试图在我的道路上添加一个目录,我有麻烦。 页: 1 为了改变我使用的指挥系统:

open ~/.bash_profile

它打开了简介档案,并视之为:

export PATH=${PATH}:/Users/Banderson/android-sdks/tools 
export PATH=${PATH}:/Users/Banderson/android-sdks/platform-tools 
#
# Your previous /Users/Banderson/.bash_profile file was backed up as /Users/Banderson/.bash_profile.macports-saved_2012-05-16_at_09:53:57
##

# MacPorts Installer addition on 2012-05-16_at_09:53:57: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

# Setting PATH for JRuby 1.7.0.RC1
# The orginal version is saved in .bash_profile.jrubysave
PATH="${PATH}:/Library/Frameworks/JRuby.framework/Versions/Current/bin"
export PATH

Then I added this:

   export PATH=${PATH}:/Users/Banderson/Documents/awstats-7.1/wwwroot/cgi-bin/

将<代码>bash_profile 参看:

export PATH=${PATH}:/Users/Banderson/android-sdks/tools 
export PATH=${PATH}:/Users/Banderson/android-sdks/platform-tools 
export PATH=${PATH}:/Users/Banderson/Documents/awstats-7.1/wwwroot/cgi-bin/
#
# Your previous /Users/Banderson/.bash_profile file was backed up as /Users/Banderson/.bash_profile.macports-saved_2012-05-16_at_09:53:57
##

# MacPorts Installer addition on 2012-05-16_at_09:53:57: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.


[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

# Setting PATH for JRuby 1.7.0.RC1
# The orginal version is saved in .bash_profile.jrubysave
PATH="${PATH}:/Library/Frameworks/JRuby.framework/Versions/Current/bin"
export PATH

在我补充说,我节省了这笔费用之后,当时在终点站,我执行了<条码>:源码-~/bash_profile。 指挥部关闭了终端窗户,启用了一个新窗户,试图从我给这条路增添的名录上发射一个档案,但它的确做了一些工作。 谁能告诉我我我我我,我是谁做错了,我如何纠正?

EDIT:

此处为<代码>echo$PATH收益:

/Users/Banderson/.rvm/gems/jruby-1.6.8/bin:/Users/Banderson/.rvm/gems/jruby-1.6.8@global/bin:/Users/Banderson/.rvm/rubies/jruby-1.6.8/bin:/Users/Banderson/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/Banderson/android-sdks/tools:/Users/Banderson/android-sdks/platform-tools:/Users/Banderson/Documents/awstats-7.1/wwwroot/cgi-bin/:/Library/Frameworks/JRuby.framework/Versions/Current/bin
问题回答

Your problem seems to be the inclusion of the rvm scripts. I guess, there your path is overwritten.





相关问题
Parse players currently in lobby

I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

Bash usage of vi or emacs

From a programming standpoint, when you set the bash shell to use vi or emacs via set -o vi or set -o emacs What is actually going on here? I ve been reading a book where it claims the bash shell ...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Perform OR on two hash outputs of sha1sum

I want perform sha1sum file1 and sha1sum file2 and perform bitwise OR operation with them using bash. Output should be printable i.e 53a23bc2e24d039 ... (160 bit) How can I do this? I know echo $(( ...

Set screen-title from shellscript

Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl+A shift-A Name enter I searched for about an hour on how to emulate ...

热门标签