Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!purdue!decwrl!shelby!agate!saturn!ray
From: ray@saturn.ucsc.edu (Ray Swartz)
Newsgroups: comp.unix.questions
Subject: Re: Odd vi response when input redirected
Summary: The Korn shell did it.
Keywords: vi, !cmd
Message-ID: <8654@saturn.ucsc.edu>
Date: 8 Aug 89 12:45:01 GMT
References: <8649@saturn.ucsc.edu>
Reply-To: ray@saturn.ucsc.edu (Ray Swartz)
Organization: University of California, Santa Cruz
Lines: 21

In article <8649@saturn.ucsc.edu> I wrote:
>On System V machines, the command
>
>	cat | vi
>
>works fine.  The problem is that now the shell escape doesn't
>work properly.  When I enter :!cmd, the command appears to be run, but the
>output doesn't go the the terminal.  

I discovered the problem to be a recently implemented Korn shell.  For
some reason, when the pipeline is started in the Korn shell (or the SHELL
variable is set to /bin/ksh), the :!cmd doesn't work.  It works find
if you don't use the pipeline.

BTW, don't assume that you can go from Bourne shell to the Korn shell
without any problems.  Bourne shell scripts will stop working properly
and the reference books are none too good.  This one ate 4 hours.

Ray Swartz
ray@saturn.ucsc.edu
{sun,uunet}!uworld!ans2unix