Terminal Help Needed

Discussion in 'macOS' started by admanster, Jan 3, 2010.

  1. admanster macrumors newbie

    Joined:
    Jan 3, 2010
    #1
    Hey all I'm in the beginning stages of programming Android ( I know the dark side). I was following a tutorial to install Android 2.1 and went into pico .bash_profile and following the steps , however I did something wrong so now my terminal is stuck in this whenever I start it.

    Last login: Sun Jan 3 22:44:15 on ttys000
    -bash: sdkfolder: No such file or directory
    ****-*******-macbook:~ ********$ (obviously the asterisks are not there)

    I tried to delete the com.apple.terminal.plist file, but that doesn't fix it. Is there something I can do to get rid of the second line?

    Thanks for your help!
     
  2. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #2
    You could just delete the ".bash_profile" using:

    rm ~/.bash_profile

    Quit and restart Terminal and all should be fine.

    S-
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    You'll need to type the full path to commands.
    Code:
    /usr/bin/pico .bash_profile
    Note: I'm not at my Mac to confirm that path for the pico command.
     
  4. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #4
    Huh???

    Did you actually read the OP's post? He already used pico to create the ".bash_profile" file.

    The only time you need the full path is when using shell scripts or when the shell in use does not have "/usr/bin" in its path.

    S-
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    Yes I did actually, and good job jumping to incorrect assumptions. Often when .bash_profile or .profile files gets messed up, it causes the path to not get read in, and thus cannot use commands without the full path. He showed it's not getting into bash, so he more than likely needs to the full path. He wants to edit the .bash_profile file so that's why I presented a way to do so.
     
  6. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #6
    The OP is getting into bash just fine. He showed that bash was having a problem with "sdkfolder".

    The path is set using the "path_helper" program that is executed, via "/etc/profile", when bash first starts up. This is done prior to ".bash_profile" being sourced.

    Since the ".bash_profile" is not setup by default for an account, the best thing for the OP to do is the delete the file and start over.

    If the OP has screwed up his path somehow, he will let us know. But then he would use this command to delete ".bash_profile":

    /bin/rm ~/.bash_profile

    Regards,

    S-
     
  7. admanster thread starter macrumors newbie

    Joined:
    Jan 3, 2010
    #7
    This worked for me! I was able to go back into the .bash_profile, clear out the command and then restart. Thank you!
     

Share This Page