Mac OSX:找不到bash命令

时间:2015-12-17 18:48:58

标签: python macos bash

我是新手 - 我有一个新的iMac,安装了El Capitan和system python。我已经安装了几个库,包括xcode工具。当我在终端中输入bash命令时,我得到以下内容:

-bash:$:找不到命令

关于echo $ PATH:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

在bash -x -l:

之后
+ '[' -x /usr/libexec/path_helper ']'
++ /usr/libexec/path_helper -s
+ eval 'PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin";' export 'PATH;'
++ PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin
++ export PATH
+ '[' /bin/bash '!=' no ']'
+ '[' -r /etc/bashrc ']'
+ . /etc/bashrc
++ '[' -z '\s-\v\$ ' ']'
++ PS1='\h:\W \u\$ '
++ shopt -s checkwinsize
++ '[' -r /etc/bashrc_Apple_Terminal ']'
++ . /etc/bashrc_Apple_Terminal
+++ '[' -z '' ']'
+++ PROMPT_COMMAND=update_terminal_cwd
+++ '[' 0 -eq 0 ']'
+++ '[' -n 852F6C5A-22DA-4124-8E2C-21DD219BE5B8 ']'
+++ '[' '!' -e /Users/kwilleford/.bash_sessions_disable ']'
+++ SHELL_SESSION_DID_INIT=1
+++ SHELL_SESSION_DIR=/Users/kwilleford/.bash_sessions
+++ SHELL_SESSION_FILE=/Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.session
+++ mkdir -p /Users/kwilleford/.bash_sessions
+++ '[' 1 -eq 1 ']'
+++ SHELL_SESSION_HISTFILE=/Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.history
+++ SHELL_SESSION_HISTFILE_NEW=/Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.historynew
+++ SHELL_SESSION_HISTFILE_SHARED=/Users/kwilleford/.bash_history
+++ '[' -s /Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.history ']'
+++ PROMPT_COMMAND='shell_session_history_check; update_terminal_cwd'
+++ '[' -r /Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.session ']'
+++ SHELL_SESSION_TIMESTAMP_FILE=/Users/kwilleford/.bash_sessions/_expiration_check_timestamp
+++ trap shell_session_update EXIT
+ PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin
+ export PATH
++ shell_session_history_check
++ '[' 0 -eq 0 ']'
++ SHELL_SESSION_DID_HISTORY_CHECK=1
++ shell_session_history_allowed
++ '[' -n /Users/kwilleford/.bash_history ']'
++ local allowed=0
++ shopt -q histappend
++ allowed=1
++ '[' 1 -eq 1 ']'
++ return 0
++ shell_session_history_enable
++ touch /Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.historynew
++ HISTFILE=/Users/kwilleford/.bash_sessions/852F6C5A-22DA-4124-8E2C-21DD219BE5B8.historynew
++ SHELL_SESSION_HISTORY=1
++ '[' 'shell_session_history_check; update_terminal_cwd' = shell_session_history_check ']'
++ [[ shell_session_history_check; update_terminal_cwd =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]
++ PROMPT_COMMAND=update_terminal_cwd
++ update_terminal_cwd
++ local url_path=
++ local i ch hexch LC_CTYPE=C LC_ALL=
++ (( i = 0 ))
++ (( i < 17 ))
++ ch=/
++ [[ / =~ [/._~A-Za-z0-9-] ]]
++ url_path+=/
++ (( ++i ))
++ (( i < 17 ))
++ ch=U
++ [[ U =~ [/._~A-Za-z0-9-] ]]
++ url_path+=U
++ (( ++i ))
++ (( i < 17 ))
++ ch=s
++ [[ s =~ [/._~A-Za-z0-9-] ]]
++ url_path+=s
++ (( ++i ))
++ (( i < 17 ))
++ ch=e
++ [[ e =~ [/._~A-Za-z0-9-] ]]
++ url_path+=e
++ (( ++i ))
++ (( i < 17 ))
++ ch=r
++ [[ r =~ [/._~A-Za-z0-9-] ]]
++ url_path+=r
++ (( ++i ))
++ (( i < 17 ))
++ ch=s
++ [[ s =~ [/._~A-Za-z0-9-] ]]
++ url_path+=s
++ (( ++i ))
++ (( i < 17 ))
++ ch=/
++ [[ / =~ [/._~A-Za-z0-9-] ]]
++ url_path+=/
++ (( ++i ))
++ (( i < 17 ))
++ ch=k
++ [[ k =~ [/._~A-Za-z0-9-] ]]
++ url_path+=k
++ (( ++i ))
++ (( i < 17 ))
++ ch=w
++ [[ w =~ [/._~A-Za-z0-9-] ]]
++ url_path+=w
++ (( ++i ))
++ (( i < 17 ))
++ ch=i
++ [[ i =~ [/._~A-Za-z0-9-] ]]
++ url_path+=i
++ (( ++i ))
++ (( i < 17 ))
++ ch=l
++ [[ l =~ [/._~A-Za-z0-9-] ]]
++ url_path+=l
++ (( ++i ))
++ (( i < 17 ))
++ ch=l
++ [[ l =~ [/._~A-Za-z0-9-] ]]
++ url_path+=l
++ (( ++i ))
++ (( i < 17 ))
++ ch=e
++ [[ e =~ [/._~A-Za-z0-9-] ]]
++ url_path+=e
++ (( ++i ))
++ (( i < 17 ))
++ ch=f
++ [[ f =~ [/._~A-Za-z0-9-] ]]
++ url_path+=f
++ (( ++i ))
++ (( i < 17 ))
++ ch=o
++ [[ o =~ [/._~A-Za-z0-9-] ]]
++ url_path+=o
++ (( ++i ))
++ (( i < 17 ))
++ ch=r
++ [[ r =~ [/._~A-Za-z0-9-] ]]
++ url_path+=r
++ (( ++i ))
++ (( i < 17 ))
++ ch=d
++ [[ d =~ [/._~A-Za-z0-9-] ]]
++ url_path+=d
++ (( ++i ))
++ (( i < 17 ))
++ printf '\e]7;%s\a' file://Kevins-iMac.local/Users/kwilleford

我是否需要以某种方式改变我的路径才能找到命令?感谢。

凯文

1 个答案:

答案 0 :(得分:3)

您似乎正在输入$。这不是一个bash命令。