Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mit-eddie!cybvax0!frog!custom!boykin From: boykin@custom.UUCP Newsgroups: comp.unix.questions Subject: Re: Append file commands for Unix & ex/vi Message-ID: <115@custom.UUCP> Date: Wed, 14-Jan-87 12:37:03 EST Article-I.D.: custom.115 Posted: Wed Jan 14 12:37:03 1987 Date-Received: Fri, 16-Jan-87 03:45:01 EST Organization: Custom Software Systems; Natick, MA Lines: 18 >Is there a way to append a range of text to a file from vi/ex (as opposed >to 'w' which writes or over-writes)? Both UNIX and PC/VI accept the command: :[1,$]w>> filename which will append the specified line range, with the entire buffer being the default, to the named file. Commands which use the shell escape, such as: :[!,$]w !cat >> file will work, but are very inefficient; why invoke another process when VI can do it for you?!? Joe Boykin Custom Software Systems {decvax, mit-eddie, tektronix}!frog!custom!boykin