Subject: Re: sed \n question
To: None <sudog@sudog.com>
From: David Brownlee <abs@netbsd.org>
List: netbsd-help
Date: 10/02/2000 18:11:46
	That would be option 'b' :)

                David/absolute
			       -- www.netbsd.org: A pmap for every occasion --


On Mon, 2 Oct 2000 sudog@sudog.com wrote:

>
> another possibility:
>
> 	sed -e "/pattern/d"
>
> exact functionality to grep -v.
>
> marc
>
> On Mon, 2 Oct 2000, David Brownlee wrote:
>
> > Date: Mon, 2 Oct 2000 15:26:05 +0100 (BST)
> > From: David Brownlee <abs@netbsd.org>
> > To: John Maier <jmaier@midamerica.net>
> > Cc: netbsd-help@netbsd.org
> > Subject: Re: sed \n question
> >
> > On Mon, 2 Oct 2000, John Maier wrote:
> >
> > > I'm having trouble getting sed to see \n
> > >
> > > I'm trying to write a script to delete specific lines from a file, i.e.:
> > > sed -e 's|'$1' yes\n||g' < /etc/ftpchroot > /etc/ftpchroot.new
> > >
> > > But it doesn't seem to interpret the \n as a newline character, in the
> > > search expression.
> > >
> > > If I remove the \n from the above expression, it works, but a blank line is
> > > left in the text file.
> > >
> > > Ideas?
> >
> >         a) Use \\n
> >         b) Use "sed -e '/^'$1' yes$/d' ..."
> >         c) Use "grep -v"
> >
> >
> >                 David/absolute
> > 			       -- www.netbsd.org: A pmap for every occasion --
> >
> >
> >
> >
>
>