KSH .profile problem - Why doesn't this work and how to make it work?
Jeffrey B Nicholson
jeffo at mrcnext.uiuc.edu
Fri Mar 8 12:56:05 AEST 1991
My .profile has a really long export line because I have quite a few variables
that I wish to export. As far as I can tell, it's legal to say:
var1=value1
var2=value2
..
varN=valueN
export var1 var2 .. varN
Or you could just say:
export var1=value1 var2=value2 .. varN=valueN
Correct?
Well, I have a problem with this assignment:
export LESS=wh`expr ${LINES} - 2`x8b10
Here, I am trying to calculate ${LINES} - 2 and stick that result immediately
after the "wh". As such, it causes a syntax error when I login and I can't
find the problem.
One thing I've tried is putting the whole line as the argument of an eval, so
it reads:
eval export LESS=wh`expr ${LINES} - 2`x8b10
but that causes:
${HOME:-.}/.profile[2]: jeffo: cannot open
when I login. The huge export line is the second line of my .profile.
When I execute LESS=wh`expr ${LINES} - 2`x8b10 on the command line, it works
like a charm. Also, if I export that definition (just toss an export in front
of that) it works fine. I don't understand why it wouldn't work in my
.profile.
Can anyone help? Thanks in advance.
Jeff
--
+---------------------------------------------+------------------------------+
|*These opinions are mine* This .signature is|...!uiuc.edu!jeffo (UUCP'ish)|
|mine. Everything you have just read is mine.| jeffo at uiuc.edu (ARPA'ish) |
+---------------------------------------------+------------------------------+
| "Earth destroyed by solar flare. Film at eleven." The last nightly news. |
| "Fast, Cheap, Good: Choose any two." Rule for a lot of things. |
+----------------------------------------------------------------------------+
More information about the Comp.unix.wizards
mailing list