From owner-freebsd-current Mon Aug 7 20:43:04 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id UAA19412 for current-outgoing; Mon, 7 Aug 1995 20:43:04 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id UAA19394 for ; Mon, 7 Aug 1995 20:42:50 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id NAA21696; Tue, 8 Aug 1995 13:37:55 +1000 Date: Tue, 8 Aug 1995 13:37:55 +1000 From: Bruce Evans Message-Id: <199508080337.NAA21696@godzilla.zeta.org.au> To: odiug@darkstar.informatik.rwth-aachen.de Subject: Re: bin/660: /bin/sh has problem with redirection. Cc: current@freebsd.org Sender: current-owner@freebsd.org Precedence: bulk >/bin/sh has a problem when called from make with a line like: > >foo >You will get an error: >Syntax error: end of file unexpected >*** Error code 2 These patches from the 386BSD-0.1 patchkit (04 Jun 1993 by Jim Wilson) fix the problem here. *** /usr/src/bin/sh/parser.c~ Wed May 31 14:54:04 1995 --- /usr/src/bin/sh/parser.c Wed May 31 14:54:17 1995 *************** *** 443,447 **** --- 443,450 ---- break; /* Handle an empty command like other simple commands. */ + case TSEMI: case TNL: + /* Handle EOF like other simple commands, too. */ + case TEOF: case TWORD: tokpushback++; >>Fix: >I installed the pdksh and a stripped down version of the pdksh which is more >or less a simple sh as /bin/sh. The pdksh also seems a lot smaller: >-rwxr-xr-x 1 bin bin 217088 Jul 4 22:38 ksh >lrwxr-xr-x 1 bin bin 3 Aug 8 01:16 sh -> ksh >-r-xr-xr-x 1 bin bin 299008 Jun 10 11:48 sh.old The difference is mostly for the 63K libedit.a that gives support for both vi and emacs mode line editing. Bruce