🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #1384

Re: Writing a "block" of lines to another file

#1384
From: Rouben Rostamian
Date: Sat, 26 Sep 1992 12:41
19 lines
1081 bytes
In article <Bv6n4M.Dox@encore.com> mpalmer@encore.com (Mike Palmer) writes:
>I'd like to be able to write a "block" of lines to a file, without having to
>count the lines, or get the start & end loine number.  Can I use the temp
>buffers something like:
>
>mx
>y'x
>write x to file

Almost right.  Mark the first line of the block, say, mx.  Move to
the last line of the block and do any of:
:'x,.w file         [if writing to a new file]
or
:'x,.w! file        [if re-writing an existing file]
or
:'x,.w >> file      [if appending to an existing file]
as necessary.

--
Technical Details
Message-ID: <1992Sep26.124144.6699@umbc3.umbc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!tulane!darwin.sura.net!haven.umd.edu!news.umbc.edu!math9.math.umbc.edu!rouben
References: <Bv6n4M.Dox@encore.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.editors
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!tulane!darwin.sura.net!haven.umd.edu!news.umbc.edu!math9.math.umbc.edu!rouben
From: rouben@math9.math.umbc.edu (Rouben Rostamian)
Subject: Re: Writing a "block" of lines to another file
Message-ID: <1992Sep26.124144.6699@umbc3.umbc.edu>
Sender: newspost@umbc3.umbc.edu (News posting account)
Organization: University of Maryland Baltimore Campus
References: <Bv6n4M.Dox@encore.com>
Date: Sat, 26 Sep 1992 12:41:44 GMT
Lines: 21