home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9632 < prev    next >
Encoding:
Text File  |  1992-07-31  |  1.9 KB  |  53 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!walter!fork!snk
  3. From: snk@fork.bae.bellcore.com (Samuel N Kamens)
  4. Subject: Re: setenv question
  5. Message-ID: <1992Jul31.115741.17682@walter.bellcore.com>
  6. Sender: news@walter.bellcore.com
  7. Nntp-Posting-Host: fork.bae.bellcore.com
  8. Reply-To: snk@bae.bellcore.com
  9. Organization: Bell Communications Research
  10. References:  <1992Jul31.065928.1366@u.washington.edu>
  11. Date: Fri, 31 Jul 92 11:57:41 GMT
  12. Lines: 39
  13.  
  14. In article <1992Jul31.065928.1366@u.washington.edu>, sue@byron.u.washington.edu (Shu-Chen Eclipse) writes:
  15. > Hellow,
  16. > I'm a new beginer at unix. I was trying to do a  setenv FONTPATH ..long list
  17. > of directories>, and I'm having problems.
  18. >   Because I couldnnt fit the list into one line, I tried to break i up:
  19. > setenv FP1  '...../.../:/...../.../:.../.../more stuff'
  20. > setenv FP2 '$FP1:/..../.../:/.../..'
  21. > setenv FP3 '$FP2:/..../.../:/..../..../'
  22. > setenv FONTPATH $FP3
  23. > what I get is the $FPn dont get translated.  Also if I leave out the ' ', I get
  24. > errors; if i try to enclose the stuff in ( ) like in set path =(list of directories), it complains about the "("; if I try ('diretories list') it doesn't
  25. > complain about the "(", but it doesnt work.
  26.  
  27.  
  28. You tried almost all of the combinations except the right one :-)
  29.  
  30. When you enclose something in single quotes (') in shell, environment
  31. variables inside the quotes do not get expanded.  Try enclosing your
  32. comands in double quotes ("), like this:
  33.  
  34. setenv FP1 '...../.../:/...../.../:.../.../more stuff'
  35. setenv FP2 "$FP1:/..../.../:/.../.."
  36. setenv FP3 "$FP2:/..../.../:/..../..../"
  37. setenv FONTPATH $FP3
  38.  
  39. For that matter, you could have left the quotes out altogether because
  40. there are no spaces in your environment variable values.
  41.  
  42. Sam
  43.  
  44. -- 
  45. Sam Kamens                    Bell Communications Research
  46. snk@bae.bellcore.com                Phone: (908) 699-7509
  47. 444 Hoes Lane  Room RRC 1D-210
  48. Piscataway, NJ 08854
  49.