Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!ka From: ka@june.cs.washington.edu (Kenneth Almquist) Newsgroups: comp.unix.wizards Subject: Re: shell file descriptor programming (was: Unlinked temp files) Message-ID: <8087@june.cs.washington.edu> Date: 3 May 89 01:42:42 GMT References: <871@marvin.Solbourne.COM> <1015@philmds.UUCP> <296@tree.UUCP> Organization: U of Washington, Computer Science, Seattle Lines: 35 stever@tree.UUCP (Steve Rudek) writes: > Neither works under the ksh (Microport System V/AT 2.4) though both work > under the bourne shell (tested with the shell script). The ksh failure is > absolutely silent. > > Obviously the ksh isn't 100% compatible (I've also noticed that function > recursion which works under sh fails under ksh--but at least it has the > decency to complain). Is this sort of file rewind impossible under ksh? > Any guesses as to why the ksh falls down? Other significant upward > incompatabilities? It's supposed to be a feature. The idea is that if you save file descriptors by moving them, you don't necessarily want to pass them to the programs you run. Let me explain that last sentence with an example: if test $flag; then exec 3<&0