open command does´not found in bash

I edited my .bash_profile with a new line, after i did source .bash_profile some commands does not work like:




open (so i can´t modify the wrong lines in the .bash_profile file)
ls

mkdir


but some like
cd

pwd


DOES work


here is an example of my terminal:

MBP-de-Rodrigo:~ rodrigoleon$ open .bash_profile

-bash: open: command not found

MacBook Pro with Retina display, OS X Yosemite (10.10.3)

Posted on Apr 24, 2015 11:19 AM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Apr 24, 2015 4:36 PM

Some commands are built into the shell itself. Those will work. If you have scrambled your path, then all of the external command will be broken.


What line did you add anyway?


When editing the shell config files, you should always keep at least one Terminal window open. Test the new configuration in a new Terminal window. That way, if you scramble the files, you can still fix it with your functional window.

3 replies
Sort By: 
Question marked as ⚠️ Top-ranking reply

Apr 24, 2015 4:36 PM in response to rleonloya

Some commands are built into the shell itself. Those will work. If you have scrambled your path, then all of the external command will be broken.


What line did you add anyway?


When editing the shell config files, you should always keep at least one Terminal window open. Test the new configuration in a new Terminal window. That way, if you scramble the files, you can still fix it with your functional window.

Reply

Apr 24, 2015 5:31 PM in response to rleonloya

/usr/bin/open .bash_profile

to get you back into your text editor.

it should be

export PATH=$PATH:/usr/local/bin

with each path added to PATH separated by a colon :

AND NO SPACES (unless the path itself has a space, then you need to protect those spaces with quotes) especially around the = you do not want spaces.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

open command does´not found in bash

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.