LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-08-2005, 01:25 PM   #1
cqmyg5
LQ Newbie
 
Registered: Apr 2005
Posts: 29

Rep: Reputation: 15
"Word too long" error, how to solve?


when I run some csh script, It will show out "Word too long" error.
I have used "#!/bin/csh -xf" to trace the error, the script stop at:

setenv LD_LIBRARY_PATH $ABC_HOME/abc/cde/fgh:$LD_LIBRARY_PATH

What's the cause? How to solve it? Thanks!

BTW, My linux is Slackware 10.1.
 
Old 04-08-2005, 01:38 PM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
----------
setenv LD_LIBRARY_PATH $ABC_HOME/abc/cde/fgh:$LD_LIBRARY_PATH
----------
shouldn't that be :

setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:ABC_HOME/abc/cde/fgh

without the " $ " ?

not sure though.....

egag

Last edited by egag; 04-08-2005 at 01:43 PM.
 
Old 04-08-2005, 01:51 PM   #3
cqmyg5
LQ Newbie
 
Registered: Apr 2005
Posts: 29

Original Poster
Rep: Reputation: 15
Thank you! It works without the " $ " ! but the $ABC_HOME is also a variable, it could be without "$" or not?

and my another application is also show this "Word too long" error, but I couldn't modify the script. if there's any other way to waive the error?

A strange thing is that I before could run this application successfully without the "Word too long" error, but now I could not.

Last edited by cqmyg5; 04-08-2005 at 02:05 PM.
 
Old 04-08-2005, 02:07 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
well... on that first command :

i think you meant to add "ABC_HOME/abc/cde/fgh " to the LD_LIBRARY_PATH ?
( so if you type " echo $LD_LIBRARY_PATH " it has " :ABC_HOME/...etc " at the end. )

...or is the whole " $ABC_HOME/abc/cde/fgh " a variable ?
and if "$ABC_HOME " is a variable, then what is "/abc/cde/fgh" ?

and on your last Q ?
maybe i'm wrong all the way , and must you set the max-length of variables to a higher value...?
( i do not know csh though... )

egag
 
Old 04-08-2005, 02:29 PM   #5
cqmyg5
LQ Newbie
 
Registered: Apr 2005
Posts: 29

Original Poster
Rep: Reputation: 15
$ABC_HOME means:

setenv ABC_HOME /tools/ABC

so "$ABC_HOME/abc/cde/fgh" must be "/tools/ABC/abc/cde/fgh"

Last edited by cqmyg5; 04-08-2005 at 02:34 PM.
 
Old 04-08-2005, 02:59 PM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
hmmm....just tested :

------
egag@Slack21:~$ csh
%setenv ABC_HOME /tools/ABC
%echo $ABC_HOME
/tools/ABC
%setenv LD_LIBRARY_PATH /home:/home/egag
%echo $LD_LIBRARY_PATH
/home:/home/egag
%setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:$ABC_HOME/abc/cde/fgh
Bad : modifier in $ ($).
%setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:&$ABC_HOME/abc/cde/fgh
Bad : modifier in $ (&).
%setenv LD_LIBRARY_PATH $ABC_HOME/abc/cde/fgh:$LD_LIBRARY_PATH
%echo $LD_LIBRARY_PATH
/tools/ABC/abc/cde/fgh:/home:/home/egag
%
------------

what i suggested was wrong and the line from your first post is right.
but...are they really " long "

what does " echo $LD_LIBRARY_PATH " give ?

egag
 
Old 04-08-2005, 04:09 PM   #7
cqmyg5
LQ Newbie
 
Registered: Apr 2005
Posts: 29

Original Poster
Rep: Reputation: 15
hi egag,

Follow your steps, it seems no problem to csh:
setenv LD_LIBRARY_PATH $ABC_HOME/abc/cde/fgh:$LD_LIBRARY_PATH

and echo $LD_LIBRARY_PATH " gives "/tools/ABC/abc/cde/fgh:/usr/share"

-----------------------------

and WOW the script can run successfully now, I haven't changed anything, just followed your steps to have a check.

I don't know why, maybe last time it will fail again.

Last edited by cqmyg5; 04-08-2005 at 04:14 PM.
 
Old 04-08-2005, 04:17 PM   #8
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
strange thing......
maybe " csh " just needed to see an example of how it's done ......

well, just keep it in mind.
maybe you'll find the reason another time....

egag
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 01:03 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
FC4 install errors, "diabling IRQ #10" "nobody cares" error message??? A6Quattro Fedora 6 07-20-2005 12:49 PM
how to solve missing "XFree86-DRI" on display ":0.0" digitX Linux - Software 13 03-05-2005 03:46 AM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-06-2005 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:06 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