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

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!igc.apc.org!scott
  3. From: scott@igc.apc.org (Scott Weikart)
  4. Subject: Re: odd 'shift' behaviour with bash-1.1
  5. Message-ID: <9208312221.AA21541@igc.apc.org>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 31 Aug 1992 22:21:25 GMT
  10. Approved: bug-bash@prep.ai.mit.edu
  11. Lines: 17
  12.  
  13. >Its SOP for shells that when a control statement has I/O redirected
  14. >the control statement is run in a sub-shell, and so can't affect anything
  15. >in the environment of the real shell (including $# etc).
  16.  
  17. This is not true, in general (last week I wrote a program to test it).
  18.  
  19. Redirecting stdin or stdout to files doesn't result in use of a sub-shell; the
  20. subshell is only used when stdin or stdout is connected to another process
  21. (i.e. the control statement is in a pipeline).  And note that ksh88 doesn't
  22. use a sub-shell when only stdin is connected to a process, but *does* use a
  23. sub-shell when stdout is connected to a process; ksh86 and bash use a
  24. sub-shell in either case.
  25.  
  26. Scott Weikart            Community Data Processing (CdP): 415-322-9069
  27. Internet: scott@igc.org        Bitnet: scott%igc.org@stanford
  28. UUCP Mail Net: uunet!cdp!scott
  29.  
  30.