Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!ames!scubed!piaget!jc
From: jc@piaget.UUCP (John Cornelius)
Newsgroups: comp.unix.questions
Subject: Re: Append file commands for Unix & ex/vi
Message-ID: <155@piaget.UUCP>
Date: Mon, 12-Jan-87 11:07:25 EST
Article-I.D.: piaget.155
Posted: Mon Jan 12 11:07:25 1987
Date-Received: Mon, 12-Jan-87 22:45:06 EST
References: <2333@dalcs.UUCP>
Reply-To: jc@piaget.UUCP (John Cornelius, System Manager)
Distribution: na
Organization: International Widget
Lines: 28
Keywords: append command unix ex vi

In article <2333@dalcs.UUCP> lane@dalcs.UUCP (John Wright/Dr. Pat Lane) writes:
:
: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)?
:
:Are there simple Unix commands to append files with syntax and action similar
:to 'cp' and 'mv'.  I developed the following alii and I'm wondering if they
:are necessary:
:	alias append cat !:1 >>!:2`test -d !:2 && echo /!:1`
:	alias tack append !:1 !:2 && rm !:1
:
:	(I would accept suggestions on a better name for the latter!)
:
:Many thanks.

The VI document suggests that "Sometimes it is necessary to
append iformation onto the end of a file that already exists.
For example, if you wanted to append several lines to the file
'save', you could use the command:

	:12,25w >>save

"The editor will display the name of the file 'save', the number
of lines, and the number of characters added to the file."

-- 
John Cornelius
(...!sdcsvax!piaget!jc)