Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: General, /bin/sh, IO, etc... Message-ID: <1990Jun6.011303.22871@virtech.uucp> Date: 6 Jun 90 01:13:03 GMT References: Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Distribution: comp Organization: Virtual Technologies Inc., Sterling VA Lines: 40 In article scott@cs.odu.edu (Scott Yelich) writes: >1) Why does IFS affect the commands in a shell, not just the text? Because that is hat it is supposed to do. The shell has no idea of 'text'. It uses the IFS to parse all lines. > Do the braces { } create a sub shell (yic!)? Not necessarily, but they will be if the input/output is redirected or if the group is put in the background. This is similar to the way that while and/or for loops are processed. > What about functions? Functions are run in the current shell unless run in the background. > I get the same number... but the process table shows ``cat'' by a >different process number and it diagrams it as if it were a sub/child >process! The problem with your example is that the $$ is interpreted when the controlling shell reads the lines (i.e. before the lines are executed). > %tail -f file | tr "Aa" > Works... > %tail -f file | tr "Aa" |\ > while read LINE > do > echo $LINE > done > Doesn't work. What do you mean by "doesn't work"? I have used whiles at the end of pipelines ithout any problems. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170