Article View: gnu.bash.bug
Article #923Re: odd 'shift' behaviour with bash-1.1
From: Scott Weikart
Date: Mon, 31 Aug 1992 22:21
Date: Mon, 31 Aug 1992 22:21
16 lines
1228 bytes
1228 bytes
>Its SOP for shells that when a control statement has I/O redirected >the control statement is run in a sub-shell, and so can't affect anything >in the environment of the real shell (including $# etc). This is not true, in general (last week I wrote a program to test it). Redirecting stdin or stdout to files doesn't result in use of a sub-shell; the subshell is only used when stdin or stdout is connected to another process (i.e. the control statement is in a pipeline). And note that ksh88 doesn't use a sub-shell when only stdin is connected to a process, but *does* use a sub-shell when stdout is connected to a process; ksh86 and bash use a sub-shell in either case. Scott Weikart Community Data Processing (CdP): 415-322-9069 Internet: scott@igc.org Bitnet: scott%igc.org@stanford UUCP Mail Net: uunet!cdp!scott
Technical Details
Message-ID:
<9208312221.AA21541@igc.apc.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!igc.apc.org!scottShow Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!igc.apc.org!scott From: scott@igc.apc.org (Scott Weikart) Subject: Re: odd 'shift' behaviour with bash-1.1 Message-ID: <9208312221.AA21541@igc.apc.org> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 31 Aug 1992 22:21:25 GMT Approved: bug-bash@prep.ai.mit.edu Lines: 17