|
|
-bash: export: `/usr/bin:/bin:/usr/sbin:/sbin': not a valid identifier
|
|
|
|
Forum Regular
Join Date: Aug 2006
Status:
Offline
|
|
Hi,
Everytime I open the terminal, under Welcome to Darwin, I got this message-
-bash: export: `/usr/bin:/bin:/usr/sbin:/sbin': not a valid identifier
Everything seems to be working fine. But how the hell can I get rid of it. It's driving me CRAZY! :0
I use OSX 10.4.8 on a G4 Mac mini.
Thanks in advance.
MacPC.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status:
Offline
|
|
Do this, would you?
cat ~/.bashrc
and paste the contents here? Seems like you have a messed-up line in your .bashrc (or possibly .profile or .bash_profile.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Aug 2006
Status:
Offline
|
|
Hi,
Thanks.
I did cat ~/.bashrc, it came up nothing.
I was looking through all the bash related files,
In the /etc/bashrc, I have:
# System-wide .bashrc file for interactive bash(1) shells.
if [ -n "$PS1" ]; then PS1='\hw \u\$ '; fi
# Make bash check it's window size after a process completes
shopt -s checkwinsize
Not sure what this does.
In my /etc/profile I have:
# System-wide .profile for sh(1)
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
Not sure what this does either.
I think the error msg has to do with one of the above files.
In my ~/.bashrc I have:
export PATH=/usr/local/mysql/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/Developer/Tools: $PATH
and in my ~/.bash_profile I have
export PATH=/usr/local/mysql/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/Developer/Tools: $PATH
same as ~/.bashrc.
There is also a .bash_history in the /Users?myusername/ but it's blank.
Do they look normal?
MacPC.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Remove the space right before $PATH in your ~/.bashrc and ~/.bash_profile
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Aug 2006
Status:
Offline
|
|
Thanks so much besson3c. After I removed the space, the error message is gone!
MacPC
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Apr 2008
Status:
Offline
|
|
I dont remember it printing "not a valid identifier".
I have the original /etc bashrc and profile files,
$ export
declare -x PATH="/usr/bin:/bin:/usr/sbin:/sbin"
$ export $PATH
-bash: export: `/usr/bin:/bin:/usr/sbin:/sbin': not a valid identifier
I try to add a homepath .profile file including,
PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/X11R6/bin
export PATH
$ export
declare -x PATH="/usr/bin:/bin:/usr/sbin:/sbin:/Users/user/bin:/usr/local/bin:/usr/X11R6/bin"
$ export $PATH
bash: export: `/usr/bin:/bin:/usr/sbin:/sbin:/Users/user/bin:/usr/local/bin:/usr/X11R6/bin': not a valid identifier
(
Last edited by kriztyke; Apr 10, 2008 at 06:32 PM.
)
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Jan 2001
Location: Polwaristan
Status:
Offline
|
|
Don't email. Just post here so we can all benefit.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by kriztyke
I dont remember it printing "not a valid identifier".
I have the original /etc bashrc and profile files,
$ export
declare -x PATH="/usr/bin:/bin:/usr/sbin:/sbin"
$ export $PATH
-bash: export: `/usr/bin:/bin:/usr/sbin:/sbin': not a valid identifier
I try to add a homepath .profile file including,
PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/X11R6/bin
export PATH
$ export
declare -x PATH="/usr/bin:/bin:/usr/sbin:/sbin:/Users/user/bin:/usr/local/bin:/usr/X11R6/bin"
$ export $PATH
bash: export: `/usr/bin:/bin:/usr/sbin:/sbin:/Users/user/bin:/usr/local/bin:/usr/X11R6/bin': not a valid identifier
We don't:
export $PATH
Rather... we:
export PATH
|
-HI-
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Apr 2008
Status:
Offline
|
|
That doesnt print anything, I want the declare printed.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Apr 2008
Status:
Offline
|
|
I just wondered: is it normal to get that print running bash export $PATH or is something failing?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by kriztyke
I just wondered: is it normal to get that print running bash export $PATH or is something failing?
If the user is still trying to `` export $PATH ''
then the user is the one who is failing. [see above]
What do you want "printed"? You mean on screen?
echo $PATH
is possible, but it's not clear what you're trying to achieve.
[the answer given by Chuckit satisfied that already anyway.]
(
Last edited by Hal Itosis; Apr 20, 2008 at 05:05 PM.
)
|
-HI-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|