Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] sed or perl script help please . . .
- Date: Mon, 5 Aug 2002 12:43:44 -0400
- From: Viktor Pavlenko <vvp@example.com>
- Subject: Re: [tlug] sed or perl script help please . . .
- References: <F132q9IcVux1Zcn8TtE000005b5@example.com>
>>>>> "JI" == Jean-Christian Imbeault <jean_christian@example.com> writes: JI> I have a file that contains lines like this: JI> 1 some JI> text with JI> C/R's JI> in annoying places JI> 2 more text JI> with CRs JI> 3 text text text JI> 4 text text JI> I'd like to concat the lines that don't have leading numbers JI> in to one long line like this: JI> 1 sometext with C/R's in annoying places JI> 2 more text with CRs JI> 3 text text text JI> 4 text text JI> Can someone suggest a sed (or perl if it is better suited to JI> this) script to concat the lines? If your file is named crs.txt, do $ perl -pe 'BEGIN{$/=""} s/\n(?=\D)/ /g' < crs.txt Well I wanted something like perl -pe 's/\n(\D)/ $1/sg' < crs.txt or perl -pe 's/\n(?=\D)/ /sg' < crs.txt but they don't work. Any ideas why? Viktor
- Follow-Ups:
- Re: [tlug] sed or perl script help please . . .
- From: SAKUMA Junichi
- Re: [tlug] sed or perl script help please . . .
- From: Bruno Raoult
- References:
- [tlug] sed or perl script help please . . .
- From: Jean-Christian Imbeault
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] searching but don't where to look!!
- Next by Date: Re: [tlug] searching but don't where to look!!
- Previous by thread: Re: [tlug] sed or perl script help please . . .
- Next by thread: Re: [tlug] sed or perl script help please . . .
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links