HP3000-L Archives

February 2005, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Keven Miller <[log in to unmask]>
Reply To:
Keven Miller <[log in to unmask]>
Date:
Tue, 8 Feb 2005 22:40:51 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
(sed is my friend, sed is my friend, sed....)

try
:%s/^\(.\{29\}\)./\1"/
:%s/^/longstringplus"/



Tracy Pierce wrote:
> Here's what I want to do, described using Qedit commands:
>
> c30/30\"\@;c1\longstringplus"\@
>
> (which changes column 30 to a " in every line of the file, and inserts
> longstringplus" at column 1 in every line of the file).
>

commentary
%s    = substitute (%= all lines)
^     = start of line
\( \) = grouping; each is numbered from 1
.     = any character
\{n\} = exact count of n times
\1    = substitute in group 1


Keven Miller
[log in to unmask]

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2