remove new line and bring next line up

vu pham vu at sivell.com
Fri Apr 9 19:00:02 PDT 2010


On 04/09/2010 03:20 PM, Doug Hunley wrote:
>
>
> On Fri, Apr 9, 2010 at 15:09, Vu Pham <vu at sivell.com 
> <mailto:vu at sivell.com>> wrote:
>
>     In vi, I use J at the end of a line to move the next line up next
>     to the current line. How can I do it over many lines by one or two
>     commands ?
>
>     What I want is to convert
>
>     a,
>     b,
>     c,
>     d,
>     e
>
>     to a,b,c,d,e
>
>
>     I tried
>     :n,m s/control-VcontrolJ//g
>     but it fails.
>
>
> cat $file | tr -d '\n' > $file.new
Thanks, Doug. My email was not clear. I just want to do that for some 
lines only, not the whole file. Thanks, anyway.

Vu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/linux-users/attachments/20100409/194ebde9/attachment-0002.html 


More information about the Linux-users mailing list