home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / question / 10020 < prev    next >
Encoding:
Text File  |  1992-08-12  |  896 b   |  43 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!osiris.cso.uiuc.edu!gordon
  3. From: gordon@osiris.cso.uiuc.edu (John Gordon)
  4. Subject: csh foreach question
  5. Message-ID: <BswB6M.Dxw@news.cso.uiuc.edu>
  6. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  7. Organization: University of Illinois at Urbana
  8. Date: Thu, 13 Aug 1992 00:11:08 GMT
  9. Keywords: csh,foreach
  10. Lines: 31
  11.  
  12.  
  13.     Given the following script:
  14. #
  15. foreach line ( `cat this_script` )
  16.   echo "$line"
  17. end
  18.  
  19.  
  20.     I would expect the output to be:
  21.  
  22. #
  23. foreach line ( `cat this_script` )
  24.   echo "$line"
  25. end
  26.  
  27.     However, I get:
  28.  
  29. #
  30. foreach
  31. line
  32. (
  33. )
  34. echo
  35. "$line"
  36. end
  37.  
  38.     Is this what's supposed to happen?  Any help appreciated.
  39.  
  40. ---
  41. John Gordon                        My incredibly witty saying has been 
  42. gordon@osiris.cso.uiuc.edu         Politically Corrected into oblivion.
  43.