From: Rick Pasotto <[EMAIL PROTECTED]>
> On Thu, Jul 15, 2004 at 10:05:43PM -0500, Patrick
Albuquerque wrote:
> > From: Sean <[EMAIL PROTECTED]> Date:
Thursday, July 15, 2004 8:49
> > am Subject: vi globally append question
> >
> > > hi all,
> > >
> > > i have a file like;
> > >
> > > # one 123
On Thu, Jul 15, 2004 at 10:05:43PM -0500, Patrick Albuquerque wrote:
> From: Sean <[EMAIL PROTECTED]> Date: Thursday, July 15, 2004 8:49
> am Subject: vi globally append question
>
> > hi all,
> >
> > i have a file like;
> >
> > # one 123
> >
> > and i would like to APPEND a # at the beginning
From: Sean <[EMAIL PROTECTED]>
Date: Thursday, July 15, 2004 8:49 am
Subject: vi globally append question
> hi all,
>
> i have a file like;
>
> #
> one
> 123
>
> and i would like to APPEND a # at the beginning of
> each line which is not started with a # . how can i do
> it with vi or ed, so fa
On Thu, Jul 15, 2004 at 02:25:52PM -0400, Rick Pasotto wrote:
> On Thu, Jul 15, 2004 at 07:45:26PM +0200, Matthias Czapla wrote:
> > On Thu, Jul 15, 2004 at 11:05:32AM -0400, David Turetsky wrote:
> > > > i have a file like;
> > > >
> > > > #
> > > > one
> > > > 123
> > > >
> > > > and i would li
On Thu, Jul 15, 2004 at 07:45:26PM +0200, Matthias Czapla wrote:
> On Thu, Jul 15, 2004 at 11:05:32AM -0400, David Turetsky wrote:
> > > i have a file like;
> > >
> > > #
> > > one
> > > 123
> > >
> > > and i would like to APPEND a # at the beginning of
> > > each line which is not started with a
On Thu, Jul 15, 2004 at 12:06:07PM -0400, David Turetsky wrote:
>
> David Turetsky wrote:
>
> >>:%s/^[a-z]:[0-9]/#/g
>
> > Try something like:
>
> > %g!/^#/s/^/#/
>
> > Steve Lamb replied:
>
> >Personally I'd do it this way:
> >%s/\(.*\)/#\1/g
>
> David responded:
>
> Steve's ap
On Thu, Jul 15, 2004 at 11:05:32AM -0400, David Turetsky wrote:
> > i have a file like;
> >
> > #
> > one
> > 123
> >
> > and i would like to APPEND a # at the beginning of
> > each line which is not started with a # . how can i do
> > it with vi or ed, so far, i 've tried;
> >
> > :%s/^[a-z]:[0
On Thu, 15 Jul 2004 06:49:20 PDT, Sean writes:
>and i would like to APPEND a # at the beginning of
>each line which is not started with a # . how can i do
>it with vi or ed, so far, i 've tried;
>
>:%s/^[a-z]:[0-9]/#/g
>
>but this would CHANGE the first character of each line
>to a hash, pls help.
David Turetsky wrote:
> Steve's approach would put a # in the front of ALL
> lines whether or not they initially contain an existing
> # to begin with
Oh, uh, whoops. :) Well, at least he'd see the \(.*\) and \1 move the
text over and hopefully know to take the set he constructed, plac
David Turetsky wrote:
>>:%s/^[a-z]:[0-9]/#/g
> Try something like:
> %g!/^#/s/^/#/
> Steve Lamb replied:
>Personally I'd do it this way:
>%s/\(.*\)/#\1/g
David responded:
Steve's approach would put a # in the front of ALL
lines whether or not they initially contain an existi
David Turetsky wrote:
>>:%s/^[a-z]:[0-9]/#/g
> Try something like:
> %g!/^#/s/^/#/
Personally I'd do it this way:
%s/\(.*\)/#\1/g
I know there are more concise ways to do it but this at least shows why
the approach the OP took was not working.
--
Steve C. Lamb | I'
> -Original Message-
> From: Sean [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 15, 2004 9:49 AM
> To: debian-user
> Subject: vi globally append question
>
> hi all,
>
> i have a file like;
>
> #
> one
> 123
>
> and i would like to APPEND a # at the beginning of
> each line which is
On Thu, Jul 15, 2004 at 10:24:32AM -0400, Rick Pasotto wrote:
| On Thu, Jul 15, 2004 at 06:49:20AM -0700, Sean wrote:
| > hi all,
| >
| > i have a file like;
| >
| > # one 123
| >
| > and i would like to APPEND a # at the beginning of each line
|
| 'append' means to add to the end. It is imposs
On Thu, Jul 15, 2004 at 06:49:20AM -0700, Sean wrote:
> hi all,
>
> i have a file like;
>
> # one 123
>
> and i would like to APPEND a # at the beginning of each line
'append' means to add to the end. It is impossible to append to the
beginning of something.
> which is not started with a # . h
14 matches
Mail list logo