Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!njin!princeton!notecnirp!nfs From: nfs@notecnirp.Princeton.EDU (Norbert Schlenker) Newsgroups: comp.os.minix Subject: V1.4a shell: echoing bug and fix Summary: sh -x now works as before Keywords: v1.4a shell echo bug fix Message-ID: <18225@princeton.Princeton.EDU> Date: 18 Jul 89 04:07:21 GMT References: <1952@ast.cs.vu.nl> <1633@ditsyda.oz> Sender: news@princeton.Princeton.EDU Reply-To: nfs@notecnirp.UUCP (Norbert Schlenker) Organization: Dept. of Computer Science, Princeton University Lines: 26 The following cdiff fixes a problem with the v1.4a shell (the problem was first noted by Bruce Evans). The problem is that the shell refuses to echo the setting of variables when echoing is requested (via the -x flag or set -x). Note that the patch will not apply to the base v1.3 shell; it must be applied after Andy Tanenbaums's v1.4a patches. ------------------------------ Cut here --------------------------------- *** sh3.c.orig Wed Jun 21 01:54:32 1989 --- sh3.c Wed Jun 21 02:34:02 1989 *************** *** 223,229 **** /* strip all initial assignments */ /* not correct wrt PATH=yyy command etc */ if (flag['x']) ! echo(wp); if (cp == NULL && t->ioact == NULL) { while ((cp = *owp++) != NULL && assign(cp, COPYV)) ; --- 223,229 ---- /* strip all initial assignments */ /* not correct wrt PATH=yyy command etc */ if (flag['x']) ! echo (cp ? wp: owp); if (cp == NULL && t->ioact == NULL) { while ((cp = *owp++) != NULL && assign(cp, COPYV)) ;