home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / bash / bug / 580 < prev    next >
Encoding:
Text File  |  1992-08-30  |  1.1 KB  |  30 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!cs.mu.oz.AU!kre
  3. From: kre@cs.mu.oz.AU (Robert Elz)
  4. Subject: Re: odd `shift' behaviour with bash-1.12
  5. Message-ID: <9224303.18766@mulga.cs.mu.OZ.AU>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Computer Science, University of Melbourne, Australia
  8. References: <SPA.92Aug27153635@khore-dump.fct.unl.pt>
  9. Distribution: gnu
  10. Date: Sat, 29 Aug 1992 17:05:46 GMT
  11. Approved: bug-bash@prep.ai.mit.edu
  12. Lines: 16
  13.  
  14. In <SPA.92Aug27153635@khore-dump.fct.unl.pt>
  15. spa@fct.unl.PT (Salvador Pinto Abreu) writes:
  16.  
  17. | The scope of the `shift' command seems to be the innermost loop. For
  18. | example, the following code:
  19.  
  20. Take away the "| cat" which takes the output from your inner loop,
  21. and try it then (though your output will no longer be buffered by cat).
  22.  
  23. Its SOP for shells that when a control statement has I/O redirected
  24. the control statement is run in a sub-shell, and so can't affect anything
  25. in the environment of the real shell (including $# etc).  Just why it
  26. has to be that way has never been clear to me, but that's the way it is.
  27.  
  28. kre
  29.  
  30.