Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!houxm!hropus!jrw From: jrw@hropus.UUCP (Jim Webb) Newsgroups: net.sources.d Subject: Re: Piping to vi Message-ID: Date: Wed, 10-Sep-86 17:47:08 EDT Article-I.D.: hropus.669 Posted: Wed Sep 10 17:47:08 1986 Date-Received: Thu, 11-Sep-86 10:54:12 EDT References: Organization: Bell Labs, Holmdel, NJ Lines: 22 > How many times have you wanted to pipe to vi, but were loath to modify > the source? Well, I have been using the following shell function for > some time, and one of my colleagues suggested that the net might be > interested in it. This can be converted to an alias for the csh; it > will work as is in the System V.2 Bourne shell, and the Korn shell: > > pvi() > { > cat > pipe 2>&1 & view $* pipe < /dev/tty > } > ... > This is as simple to use as: ls -l | pvi How about in vi entering: :r !ls -l This runs ls -l and puts the output in the current file. It obviously works for any command that writes to stdout... -- Jim Webb "Out of phase--get help" ...!ihnp4!hropus!jrw