Re: [Nolug] Bash/ed problem

From: mikey_at_otisinc1.net
Date: Mon, 21 Apr 2003 10:37:39 -0400 (EDT)
Message-ID: <40900.192.168.1.59.1050935859.squirrel@mail.otisinc1.net>

> Often when I paste data from some weird format document into vi, the
> lines don't wrap when they should. So if I issue the J command to every
> other line, it corrects it. Obviously I don't want to do this manually.
> Is there a sed/ed script that will join every other line?
>
> e.g.
>
> This might be how the text is pasted into vi:
>
> The dog jumped over the
> fence.
> The cat chased the mouse across the
> field.
> The cow stood quietly as the farmer
> milked it.
>
> There should be three lines instead of six. I've done a Google. Any
> ideas?

Disclaimer: Not meaning to start any religious wars.

I had a similar problem with cutting and pasting in 'vi' setting up port
redirection on /etc/rc.conf in FreeBSD. Basically, all port redirection
has to be on one line.

Being the lazy sod that I am, I just edited the file in 'emacs'. It can
handle those long one-liners with ease.

--
Since-beer-leekz,
Mikey
I feel like a genocidal maniac when emacs asks me if
I want to kill 10789 characters.
___________________
Nolug mailing list
nolug@nolug.org
Received on 04/21/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST