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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-03-2009, 01:33 PM
|
#1
|
LQ Newbie
Registered: Aug 2005
Distribution: Linspire
Posts: 22
Rep:
|
setting environment variable error
Hi,
I am trying to set a long string as environment variable and getting this error, too many arguments. I am putting back slash for the new line escape. Any help is really appreciated.
setenv PATH .:/opt/vendor/software/bin:/usr/ccs/bin:\
/usr/openwin/bin:/tmp:/opt/perl/bin:/opt/patch/Oct2009:$PATH
Thanks,
meetmefar
|
|
|
12-03-2009, 01:36 PM
|
#2
|
Member
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176
Rep:
|
The $PATH setting at the end causes the line to recursively reproduce until you run out of environment space.
|
|
|
12-03-2009, 01:42 PM
|
#3
|
LQ Newbie
Registered: Nov 2009
Location: The Netherlands
Distribution: ? wath is that?
Posts: 3
Rep:
|
EasyNote Mz35-V-080 (Packardbell) doesnot start with Ubuntu 9.10, kernel 2.6.31-14-generic. The kernel is waiting for an interrupt from the disk. Thanks to the Startup monitor. I use kernel 2.6.28-16-generic insteed.
|
|
|
12-03-2009, 01:46 PM
|
#4
|
Member
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176
Rep:
|
Quote:
Originally Posted by opadeboer
EasyNote Mz35-V-080 (Packardbell) doesnot start with Ubuntu 9.10, kernel 2.6.31-14-generic. The kernel is waiting for an interrupt from the disk. Thanks to the Startup monitor. I use kernel 2.6.28-16-generic insteed.
|
What are you talking about? I think you posted to the wrong thread. It happens, sometimes.
|
|
|
12-03-2009, 01:47 PM
|
#5
|
LQ Newbie
Registered: Nov 2009
Location: The Netherlands
Distribution: ? wath is that?
Posts: 3
Rep:
|
Ubuntu 9.10 kernel 2.6.31-14 and EasyNote MZ35-V-080
The startup process is in a loop waiting for an interrupt of the disk.
I tried Ubuntu 9.10 kernel 2.6.28-16 and this one did not have that problem. PC is: Packardbell EasyNote MZ35-V-080
|
|
|
12-03-2009, 01:55 PM
|
#6
|
Member
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176
Rep:
|
Quote:
Originally Posted by opadeboer
The startup process is in a loop waiting for an interrupt of the disk.
I tried Ubuntu 9.10 kernel 2.6.28-16 and this one did not have that problem. PC is: Packardbell EasyNote MZ35-V-080
|
Alright, but this isn't that thread. This thread is about meetmefar having an error setting his environment. That's not the same thing. As for your problem, I'm guessing that's in a different thread and you still haven't realized that your on another tab or whatever.
Last edited by Hendronicus; 12-03-2009 at 01:58 PM.
Reason: clarity
|
|
|
12-03-2009, 02:16 PM
|
#7
|
LQ Newbie
Registered: Aug 2005
Distribution: Linspire
Posts: 22
Original Poster
Rep:
|
Quote:
Originally Posted by Hendronicus
The $PATH setting at the end causes the line to recursively reproduce until you run out of environment space.
|
Hi,
Thank you for the quick response. Without that How could I have the current PATH variable value to be appended?
Thanks,
meetmefar
|
|
|
12-03-2009, 02:26 PM
|
#8
|
Member
Registered: Feb 2006
Location: Oldsmar, Fl. USA
Distribution: Slackware, Ubuntu
Posts: 176
Rep:
|
Put it on the front of the line, I suppose. I'm not sure that I am correct about your problem, but the $PATH thing just kind of jumped out at me. You might be fine with it and it's really the escape for the new line that's the problem. I would be willing to bet it's one of the two.
Last edited by Hendronicus; 12-03-2009 at 02:26 PM.
Reason: spelling
|
|
|
12-03-2009, 02:37 PM
|
#9
|
LQ Newbie
Registered: Aug 2005
Distribution: Linspire
Posts: 22
Original Poster
Rep:
|
Thank You!
Same error!! Too many arguments
My only question would be that when the $PATH is in a single line as below, it executes successfully. It has the problem only when I use "\" escape for multi line.
setenv PATH .:/opt/vendor/software/bin:/usr/ccs/bin:/usr/openwin/bin:/tmp:/opt/perl/bin:/opt/patch/Oct2009:$PATH
Thanks,
meetmefar
|
|
|
12-03-2009, 05:58 PM
|
#10
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,425
|
I guess that the setenv cmd doesn't understand the newline escape.
Are you using csh; if so, why not bash
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
In any case, the simple soln is to just put it all as one line in your startup/login file eg .profile or .bash_profile or .bashrc
|
|
|
12-04-2009, 04:53 PM
|
#11
|
LQ Newbie
Registered: Oct 2008
Posts: 13
Rep:
|
The whole thing is messed up. If you're using csh then follow the previous direction on reading the csh whynot.
If you're using a Bourne flavored shell then there is not setenv command.
If you're using csh then you do not set the PATH variable using seternv. Instead you should use
set path = "d1 d2 d3 etc"
and that will set PATH for you to d1:d2:d3:etc
If you're using bash or a Bourne flavored shell (like bash) then you would use
PATH="d1:d2:d3"
but read the docs before you think you know what you're doing.
|
|
|
All times are GMT -5. The time now is 09:28 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|