Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ThatWasAwkward

macrumors member
Original poster
Jan 23, 2006
60
0
Every time I start Terminal, it says the following before the prompt and after the "last login":

"-bash: export: `PATH#': not a valid identifier"

It ALWAYS says this. I assume this is symptomatic of a slight behind-the-scenes code issue that I could easily fix if I could figure out what it is. Anyone have any idea?
 
When opening Terminal it reads a couple hidden files that sometimes have extra commands setup in them. It sounds like one of those files has a typo. Hard to say if you added the line causing the problem or an application. The files it could be in are .profile and .bash_profile generally. These will be in your home directory, which is where you'll start at when you open Terminal. To quickly see the contents of those files do,

Code:
cat .profile
cat .bash_profile
If one of those files doesn't exist it'll tell you. Neither exist by default. If you can see the offending line that resembles what the error message gave then you know where to make the fix. To edit the file you can use the pico editor or type in,
Code:
open .profile
and it'll open in TextEdit. I think that's the syntax anyways. I'm not at my Mac currently.

If you need help post the lines that you see and we'll try to help, or you can add a # to the start of the line and that will comment out the line so it doesn't try to run. I don't know if not having it will cause any issues for any installed apps, though since it's not written correctly currently that doesn't matter much.
 
Well, turns out it was a line in .profile after all. I've fixed it, and no more error message. Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.