Date: Wed, 8 Nov 2000 23:49:08 +0100 From: Manuel Enrique Garcia Cuesta <megarcia@intercom.es> To: Len Conrad <lconrad@Go2France.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: a little help with sed Message-ID: <20001108234908.D776@ilex.kicelo.org> In-Reply-To: <5.0.0.25.0.20001108232905.02799040@mail.Go2France.com> References: <5.0.0.25.0.20001108232905.02799040@mail.Go2France.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Len,
=== Len Conrad escribia
(Wed, Nov 08, 2000 at 11:32:55PM +0100):
> I'd like to remove \n and concat two lines when the last word of
> first line is a certain value but all of my reading and playing has
> only gotten me to this non-working "concept" :
>
> sed -e s/"lastword"\n/"lastword"/g <oldfile >newfile
>
> any sedistas care to take a shot?
bash-2.04$ sed '/lastword$/{
N
s/\n//
}' < oldfile > newfile
>
> Tks,
HTH
Manuel Garcia
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001108234908.D776>
