"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. |
----------
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 |
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. |
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 |
$ABC_HOME means:
setenv ABC_HOME /tools/ABC so "$ABC_HOME/abc/cde/fgh" must be "/tools/ABC/abc/cde/fgh" |
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 |
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. |
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 |
All times are GMT -5. The time now is 04:21 AM. |