Append file commands for Unix & ex/vi
boykin at custom.UUCP
boykin at custom.UUCP
Thu Jan 15 03:37:03 AEST 1987
>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
More information about the Comp.unix.questions
mailing list