Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Aug 1995 13:37:55 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        odiug@darkstar.informatik.rwth-aachen.de
Cc:        current@freebsd.org
Subject:   Re: bin/660: /bin/sh has problem with redirection.
Message-ID:  <199508080337.NAA21696@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>/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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508080337.NAA21696>