Subject: Re: Sed Bug ?
To: Stephane Engel <stephane.engel@gmail.com>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 02/02/2007 20:54:31
On Wed, Jan 31, 2007 at 11:40:51AM +0100, Stephane Engel wrote:
> Hi list,
> 
> I'm trying to merge all the line of a text file in a single line
> separate by a "#".

What is wrong with:
$ tr '\n' '#'

Or to delete the trailing '#':
$ text=$(tr '\n' '#' <file)
$ hash='#'; echo "${text%$hash}"

	David

-- 
David Laight: david@l8s.co.uk