-bash: 400:: command not found when open terminal

Shahram

I have tried to install git-completion.bash on OSX using Terminal.
Process needed to edit ~/.bash_profile as such.
I used vi ~/.bash_profile. After this changes, when I open my Terminal I see -bash: 400:: command not found and I'm not able to edit again!.
In addition to that, I have two different bash_profile in my home directory, .bash_profile.swo & .bash_profile.swp.
Can anyone please advise how can I resolve this issue?

Here is my .bash_profile:

# Setting PATH for Python 3.4     # The orginal version is saved in .bash_profile.pysave   
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"    
export PATH      # Setting PATH for Python 3.5      # The orginal version is saved in .bash_profile.pysave    
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"    
export PATH      # added by Anaconda3 4.0.0 installer    
export PATH="//anaconda/bin:$PATH"      # added by Anaconda3 4.0.0 installer    
export PATH="/anaconda/anaconda/bin:$PATH"      # Setting PATH for Python 3.5      # The original version is saved in .bash_profile.pysave        
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"    
export PATH      # added by Anaconda3 4.1.1 installer    
export PATH="//anaconda/bin:$PATH"      # Setting PATH for Python 3.5      # The original version is saved in .bash_profile.pysave    
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"    
export PATH      # Setting PATH for Python 3.5      # The original version is saved in .bash_profile.pysave    
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"   
export PATH      # Setting PATH for Python 3.5     # The original version is saved in .bash_profile.pysave   
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"   
export PATH   
export LC_ALL=en_US.UTF-8   
export LANG=en_US.UTF-8     # added by Anaconda3 4.1.1 installer    
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH"      # Setting PATH for Python 3.6      # The original version is saved in .bash_profile.pysave    
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"    
export PATH      # added by Anaconda3 4.3.1 installer    
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH"      # added by Anaconda3 4.3.1 installer    
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH"        # added by Anaconda3 4.4.0 installer    
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH"      # added by Anaconda3 5.0.1 installer    
export PATH="/Users/shahramkarimi/anaconda3/bin:$PATH"      # Show always fullpath on terminal      #export PS1='\u@\H:\w$ '    
export PS1='\u \w$ '    
if [ -f ~/.git-completion.bash ]; then     
 . ~/.git-completion.bash   
fi
dr_

The .bash_profile.swo and .bash_profile.swp files are simply temporary files created by Vim. The .swp file was created when you opened .bash_profile in the editor, and the .swo was created when you edited .bash_profile and .bash_profile.swp already existed.

For the error, check your ~/.git-completion.bash, ~/.profile, and ~/etc/profile files. Probably there's a line

400::

somewhere, and Bash interprets this as a command. You can check this via this command:

grep -H 400 ~/.git-completion.bash ~/.profile ~/etc/profile

(Post edited, thanks to @terdon for the suggestions.)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

When I open Terminal it says command alias not found and closes

From Dev

Mac terminal -bash command not found?

From Dev

Mac terminal bash “command not found”

From Dev

Typo when creating a new environmental variable in terminal and now see -bash: exort: command not found in every terminal window

From Dev

source command error from /usr/share/bash-completion/bash-completion when I open a terminal

From Dev

bash_completion causing a 'command not found' in terminal

From Dev

-bash: npm: command not found in Terminal with Docker MacOS

From Dev

When I open a terminal, before any commands, I see "PKG_CONFIG : command not found"

From Dev

bash: "command not found" when calling function defined in ~/.bashrc file in `bash -c` command while opening gnome-terminal tab

From Dev

bash: "command not found" when calling function defined in ~/.bashrc file in `bash -c` command while opening gnome-terminal tab

From Java

grunt: command not found when running from terminal

From Dev

Command found only when used with `sudo` in terminal

From Dev

Error when assigning terminal command to bash variable

From Dev

Error when assigning terminal command to bash variable

From Dev

Mac OS X Terminal Error -bash: [-f: command not found

From Dev

bash adb command not found via terminal for OUYA driver setup?

From Dev

MAC 10.10 Yosemite - Terminal: - bash: [SomeCommand] command not found?

From Dev

Terminal doesn't start properly. bash command not found

From Dev

Mac terminal error -bash: command not found - El Capitan 10.11.13

From Dev

Jenkins - bash: aws: command not found but runs fine from terminal

From Dev

Jenkins - bash: aws: command not found but runs fine from terminal

From Dev

MAC 10.10 Yosemite - Terminal: - bash: [SomeCommand] command not found?

From Dev

Why is Bash reporting “command not found” in some cases in the Terminal but not in others?

From Dev

Terminal new window always shows -bash: Searching: command not found

From Dev

Mac terminal error -bash: command not found - El Capitan 10.11.13

From Dev

Open all files in a directory and subdirectories using bash terminal command?

From Dev

How do I encode a hyphen in a Bash terminal's open command?

From Dev

Bash script. Open new terminal and run command

From Dev

bash command not found when setting a variable

Related Related

  1. 1

    When I open Terminal it says command alias not found and closes

  2. 2

    Mac terminal -bash command not found?

  3. 3

    Mac terminal bash “command not found”

  4. 4

    Typo when creating a new environmental variable in terminal and now see -bash: exort: command not found in every terminal window

  5. 5

    source command error from /usr/share/bash-completion/bash-completion when I open a terminal

  6. 6

    bash_completion causing a 'command not found' in terminal

  7. 7

    -bash: npm: command not found in Terminal with Docker MacOS

  8. 8

    When I open a terminal, before any commands, I see "PKG_CONFIG : command not found"

  9. 9

    bash: "command not found" when calling function defined in ~/.bashrc file in `bash -c` command while opening gnome-terminal tab

  10. 10

    bash: "command not found" when calling function defined in ~/.bashrc file in `bash -c` command while opening gnome-terminal tab

  11. 11

    grunt: command not found when running from terminal

  12. 12

    Command found only when used with `sudo` in terminal

  13. 13

    Error when assigning terminal command to bash variable

  14. 14

    Error when assigning terminal command to bash variable

  15. 15

    Mac OS X Terminal Error -bash: [-f: command not found

  16. 16

    bash adb command not found via terminal for OUYA driver setup?

  17. 17

    MAC 10.10 Yosemite - Terminal: - bash: [SomeCommand] command not found?

  18. 18

    Terminal doesn't start properly. bash command not found

  19. 19

    Mac terminal error -bash: command not found - El Capitan 10.11.13

  20. 20

    Jenkins - bash: aws: command not found but runs fine from terminal

  21. 21

    Jenkins - bash: aws: command not found but runs fine from terminal

  22. 22

    MAC 10.10 Yosemite - Terminal: - bash: [SomeCommand] command not found?

  23. 23

    Why is Bash reporting “command not found” in some cases in the Terminal but not in others?

  24. 24

    Terminal new window always shows -bash: Searching: command not found

  25. 25

    Mac terminal error -bash: command not found - El Capitan 10.11.13

  26. 26

    Open all files in a directory and subdirectories using bash terminal command?

  27. 27

    How do I encode a hyphen in a Bash terminal's open command?

  28. 28

    Bash script. Open new terminal and run command

  29. 29

    bash command not found when setting a variable

HotTag

Archive