Subject: Re: sed \n question
To: John Maier <jmaier@midamerica.net>
From: David Brownlee <abs@netbsd.org>
List: netbsd-help
Date: 10/02/2000 15:26:05
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 --