LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2012, 12:59 AM   #1
wangcow
LQ Newbie
 
Registered: Nov 2007
Posts: 12

Rep: Reputation: 0
Edited bashrc not sure how to fix


Hello I've been using linux a few months now and everythings been going great. Im on Mint 14 w/ Cinnamon 64-bit.

Well I was recently following this guide:
Code:
http://forum.xda-developers.com/showthread.php?t=1550414
to get adb on this distro.

Well at step 7 I alterd the line
Code:
# Android tools
export PATH=~/android-sdk-linux/platform-tools:~/android-sdk-linux/tools:$PATH
to
Code:
# Android tools
export PATH=~/Documents/Android Dev/sdk/platform-tools:~/Documents/Android Dev/sdk/platform-tools:$PATH
and now I get this error and out put whenever opening terminal:
Code:
bash: export: `Dev/sdk/platform-tools:~/Documents/Android': not a valid identifier
bash: export: `Dev/sdk/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games': not a valid identifier
jmartino@jmartino-A15 ~ $ sudo gedit ~/.bashrc
Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 21, in <module>
    os.execvp("python3", [sys.argv[0]] + sys.argv)
  File "/usr/lib/python2.7/os.py", line 344, in execvp
    _execvpe(file, args)
  File "/usr/lib/python2.7/os.py", line 380, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory
This is my first time posting in forever so I hope my post is clear.. thanks alot for any help.
 
Old 12-22-2012, 02:31 AM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Code:
# Android tools
export PATH=~/Documents/Android Dev/sdk/platform-tools:~/Documents/Android Dev/sdk/platform-tools:$PATH
The spaces in the path are not correct. If there's really a space you'll have to quote the path within ""

Markus

Last edited by markush; 12-22-2012 at 03:41 AM. Reason: typo
 
2 members found this post helpful.
Old 12-22-2012, 07:05 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
As markush said, it's the spaces. The right side of a "varname=value" setting command can only consist of a single "word" (more accurately, a "token"), as deliminated by whitespace. Quoting the string forces the shell to ignore the spaces and see it as a single unit.

This is one specific instance of the shell's argument processing and word-splitting behavior, the understanding of which is vital for scripting and shell use.

Study these links well:

http://mywiki.wooledge.org/Arguments
http://mywiki.wooledge.org/WordSplitting
http://mywiki.wooledge.org/Quotes


Even better, if at all possible, is to just not have spaces in file and path names in the first place.


Also note, BTW, that "~" is an alias designed mostly for interactive use. It's usually recommended to use the built-in "$HOME" variable instead for scripted commands.

Code:
export PATH="$HOME/Documents/Android Dev/sdk/platform-tools:$HOME/Documents/Android Dev/sdk/platform-tools:$PATH"

Last edited by David the H.; 12-22-2012 at 07:06 AM.
 
1 members found this post helpful.
Old 12-22-2012, 04:28 PM   #4
wangcow
LQ Newbie
 
Registered: Nov 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you so much that fixed it.

Thanks for the links too, Ill be reading those soon.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to use my /home/kangjoo/.bashrc rather than root/.bashrc kangjoo.lee Linux - Newbie 2 11-05-2012 03:38 PM
[SOLVED] source .bashrc makes command windows fails, how to fix it? googlez Linux - Newbie 3 10-01-2012 11:57 AM
[SOLVED] Edited .bashrc now cannot login as root Ajit Gunge Linux - Newbie 2 06-18-2012 07:13 AM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM
yum, firefox, ATI drivers, bashrc, perl/Tk, Logitech keyboard, etc - lots to fix!!!! Nalorin Linux - Software 9 06-23-2005 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration