kenney@hsi.UUCP (Brian Kenney) (08/23/90)
OK, net.gentlepeople, how about this this one?
In a K Shell script, I have a line like this:
export FOO="This is part 1." \
FOO="${FOO}This is part 2."
print $FOO
The only thing that is printed is "This is part 2."
Now, if I remove the 'export', so the lines are:
FOO="This is part 1." \
FOO="${FOO}This is part 2."
print $FOO
Now, both parts are printed.
What gives? Any help would be appreciated.
Thanks.
--
Brian Kenney kenney@hsi.com gt0178a@prism.gatech.EDU (BURNS,JIM) (08/25/90)
in article <1980@hsi86.hsi.UUCP>, kenney@hsi.UUCP (Brian Kenney) says: > export FOO="This is part 1." \ > FOO="${FOO}This is part 2." > print $FOO Works if you remove the back slash, or change it to a semi-colon, so export must buffer its setenv(3)'s, and ksh must do them one at a time. -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu