LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-24-2014, 07:56 AM   #1
PClOStinspace
Member
 
Registered: Jun 2008
Location: Bracknell, UK
Distribution: Ubuntu, mostly!
Posts: 161

Rep: Reputation: 20
bash: export: `=': not a valid identifier - bash: export: `0': not a valid identifier


A) I have been tinkering with aliases
B) I have been tinkering with various bash related config files in order to configure some software I was playing with.

To do both of these things I had been following various guides online as I am not too sure of what I'm doing.

A few days later I noticed every time I reboot and go into a terminal the first two lines above my cursor read:-

Code:
bash: export: `=': not a valid identifier
bash: export: `0': not a valid identifier
It doesn't seem to cause any problems, everything works as usual, it's just bugging me that something is obviously not right. I have googled and checked various files for ' = ' with spaces etc etc. Problem is I can't remember every file I have messed with and the files I have checked I can't see any obvious errors.

Is there a quick way of pinpointing exactly which file contains the error(s) so I can fix it??
 
Old 01-24-2014, 08:15 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
every time I reboot and go into a terminal the first two lines above my cursor read:-

Code:
bash: export: `=': not a valid identifier
bash: export: `0': not a valid identifier
Is there a quick way of pinpointing exactly which file contains the error(s) so I can fix it??
"Reboot and go into a terminal" - you meant a terminal program and not the console?
After logging in to the desktop, fire up a new terminal and see if the issue is present. This would indicate it's a ~/.bashrc issue if it shows up.

Terminal >
Code:
grep -i export ~/.bashrc
or
possible clue(s) in terminal >
Code:
export | less
Please let us know.
 
1 members found this post helpful.
Old 01-24-2014, 08:16 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Assuming this error is shown when starting a login shell (try: bash -l from a terminal) it can only be a handful of files:

Global files you can check:
/etc/bash.bashrc
/etc/profile

Local files:
~/.bashrc
~/.bash_aliases
~/.profile

The error mentions the export command, check those lines first.
 
1 members found this post helpful.
Old 01-24-2014, 08:50 AM   #4
PClOStinspace
Member
 
Registered: Jun 2008
Location: Bracknell, UK
Distribution: Ubuntu, mostly!
Posts: 161

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by Habitual View Post
"Reboot and go into a terminal" - you meant a terminal program and not the console?
Yeah, I'm using terminator.

Quote:
Originally Posted by Habitual View Post
Code:
grep -i export ~/.bashrc
That found it straight off! Funny thing was, I had edited that file and then reverted back to the original, the fault was in a line I haven't edited in months:-

Code:
export vblank_mode = "0"
should have read:-

Code:
export vblank_mode="0"
I added this one way back to fix a refresh error in Sketchup (which it did!!)
 
Old 01-24-2014, 01:11 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I too, love terminator.
Glad it worked out!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash function check for valid IP jchambers Programming 7 04-10-2020 04:51 AM
[SOLVED] Bash Scripting (BT5-R1) - not a valid identifier & \r': No such file or directory markcoker Programming 2 09-11-2011 06:08 AM
Not A Valid Identifier jetsons Linux - Software 1 01-04-2011 01:28 PM
export - Invalid identifier for environment variable ryan.greenwood Linux - Desktop 2 05-27-2007 10:22 PM
setenv - bash - export allelopath Linux - General 4 04-17-2005 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration