Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!pur-ee!ea.ecn.purdue.edu!housel From: housel@en.ecn.purdue.edu (Peter S. Housel) Newsgroups: comp.os.minix Subject: A fix for echo(1) Message-ID: <15115@ea.ecn.purdue.edu> Date: 5 Sep 89 00:48:05 GMT Sender: housel@ea.ecn.purdue.edu Reply-To: housel@en.ecn.purdue.edu (Peter S. Housel) Organization: Purdue University Engineering Computer Network Lines: 28 The /bin/echo program has had this problem since version 1.1, and I have seen postings complaining about it, but nobody has ever (to my knowledge) actually posted a fix. The program filters out '"' (double quote marks) from its output, which is quite unnecessary. The following patch is relative to the 1.1 (and every other current) version of Minix. -Peter S. Housel- housel@ecn.purdue.edu ...!pur-ee!housel *** echo.c Sat Sep 2 17:40:08 1989 --- /usr/src/commands/echo.c Wed Aug 16 09:31:26 1989 *************** *** 36,41 **** if (count == SIZE) {write(1, buf, count); count = 0;} while ( (c = *s++) != 0) { ! if (count < SIZE && c != '"') buf[count++] = c; ! } ! } --- 36,41 ---- if (count == SIZE) {write(1, buf, count); count = 0;} while ( (c = *s++) != 0) { ! if (count < SIZE) buf[count++] = c; ! } ! }