[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: howto join lines



On Wed, 2008-10-01 at 17:13 +0200, David Hláčik wrote:
> Hello guys,
> 
> i want to have those lines joined to one line with spaces
> 
> Before :
> 
> textone
> texttwo
> something
> 
> After :
> 
> textone texttwo something
> 
> So far i have been using fmt -w 2000 , but this is limited to 2000
> characters. There must be something better.

Hi David,

It's unclear if you want to do this interactively or from the command
line, and whether you want to affect all lines or just selected ones. If
you want to put all of the lines in a file onto one, you could use:

  tr "\012" " "     # convert newlines to spaces

-Chris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]