Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]RE: sed/vi how to concatenate all non-empty lines?
- To: tlug@example.com
- Subject: RE: sed/vi how to concatenate all non-empty lines?
- From: OZAWA -Crouton- Sakuro <crouton@example.com>
- Date: Wed, 25 Jul 2001 13:09:43 +0900
- Content-Type: text/plain; charset=US-ASCII
- Delivered-To: tlug@example.com
- In-Reply-To: <F7ll1YSe8y1wdi3qZLO00005a27@example.com>
- List-Help: <mailto:tlug-request@example.comsubject=help>
- List-Post: <mailto:tlug@example.com>
- List-Subscribe: <mailto:tlug-request@example.comsubject=subscribe>
- List-Unsubscribe: <mailto:tlug-request@example.comsubject=unsubscribe>
- Old-Return-Path: <crouton@example.com>
- Organization: Weatherlight
- References: <F7ll1YSe8y1wdi3qZLO00005a27@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <qSC6dC.A.slF.IckX7@example.com>
- Resent-Sender: tlug-request@example.com
- User-Agent: Wanderlust/2.5.8 (Smooth) EMY/1.13.9 (Art is long, life isshort) SLIM/1.14.7 (=?ISO-2022-JP?B?GyRCPHIwZjpMTD4bKEI=?=) APEL/10.3 MULEXEmacs/21.1 (patch 14) (Cuyahoga Valley) (i586-kondara-linux)
At Wed, 25 Jul 2001 03:39:18 +0000, Jean-Christian Imbeault wrote: > So how to I get sed or vi to concatenate all lines within a paragraph into > one linebut keep the empty lines between paragraphes? (i.e. concatenate all > consecutive non-empty lines together)? $ cat -s input.txt | sed join.sed join.sed is: BEGIN--cut here--cut here #n /^ *$/!{ H } /^ *$/{ x s/\n/ /g s/^ // p } ${ x s/\n/ /g s/^ // p } END--cut here--cut here Don't forget '#n', or use 'sed -n' instead. -- OZAWA -Crouton- Sakuro E-Mail: mailto:crouton@example.com Web: http://www.weatherlight.org/~crouton/ PGP: C98F 74E0 AEEB 4578 1DFC F650 3BE0 9627 11FC C9F5 VERBA VOLANT, SCRIPTA MANENT
- References:
- sed/vi how to concatenate all non-empty lines?
- From: "Jean-Christian Imbeault" <jean_christian@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: sed/vi how to concatenate all non-empty lines?
- Next by Date: Re: sed/vi how to concatenate all non-empty lines?
- Prev by thread: Re: sed/vi how to concatenate all non-empty lines?
- Next by thread: Re: sed/vi how to concatenate all non-empty lines?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links