home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10365 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.4 KB

  1. Xref: sparky comp.unix.questions:10365 comp.sys.sgi:12859
  2. Path: sparky!uunet!caen!nic.umass.edu!dime!lim
  3. From: lim@cs.umass.edu
  4. Newsgroups: comp.unix.questions,comp.sys.sgi
  5. Subject: csh/subshell anomalies
  6. Message-ID: <52421@dime.cs.umass.edu>
  7. Date: 25 Aug 92 18:29:21 GMT
  8. Sender: news@dime.cs.umass.edu
  9. Reply-To: lim@cs.umass.edu ()
  10. Followup-To: comp.unix.questions
  11. Organization: University of Massachusetts, Amherst
  12. Lines: 36
  13.  
  14.  
  15. Here's something about csh that's been puzzling me for a while:
  16.  
  17.  
  18. If I enter:  % alias test '(echo \!:*)'
  19. and:         % test a b c > z
  20. "a b c" is saved in file z as expected.
  21.  
  22.  
  23. If I enter:  % alias test '(echo \!:1; echo \!:2; echo \!:3)'
  24. and:         % test a b c > z
  25. It returns:  a
  26.              b
  27.              c
  28. but nothing is saved in file z.
  29.  
  30.  
  31. If I enter:  % alias test '(echo \!:*; echo \!:1)'
  32. and:         % test a b > z
  33. It returns:  a
  34. and saves only "a b" in file z, leaving out the extra "a".
  35.  
  36.  
  37. In all cases,
  38.   % (test a b c) > z
  39. saves all output in file z.
  40.  
  41.  
  42. Is this a known problem, or am I missing something? This happens in csh or
  43. tcsh-6.02, on either Ultrix-4.2 or Irix-4.0.4. I'd appreciate any help on this.
  44. Thanks.
  45.  
  46. --------------------------------------------------------------------------------
  47.              Jonathan Lim          Computer Vision Research Group
  48.            lim@cs.umass.edu    University of Massachusetts at Amherst
  49. --------------------------------------------------------------------------------
  50.