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: 06 Aug 2002 20:05:59 +0900
- From: Bruno Raoult <br@example.com>
- Subject: Re: [tlug] sed or perl script help please . . .
- References: <F132q9IcVux1Zcn8TtE000005b5@example.com> <15694.43840.422094.372348@example.com>
Viktor, Junichi, Maybe we did not understand the problem the same way, but with your program you will get many lines with se same number (if you assume for instance that the "2 XXX" could be duplicated). Should not you include a real counter somewhere? (1, 2, 3, etc...) br. On Tue, 2002-08-06 at 01:43, Viktor Pavlenko wrote: > >>>>> "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 > > > ************************************************* > TLUG server is hosted by Global Online Japan > http://home.gol.com/index_e.html > ************************************************* > > ================================================= > To unsubscribe from this mailing list, > please see instructions at > http://www.tlug.jp/list.html > ================================================= > -- Warning: This signature is a Linux virus. Please delete one file, then set it as your signature.Attachment: signature.asc
Description: This is a digitally signed message part
- References:
- [tlug] sed or perl script help please . . .
- From: Jean-Christian Imbeault
- Re: [tlug] sed or perl script help please . . .
- From: Viktor Pavlenko
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] sed or awk or what?
- Next by Date: Re: [tlug] sed or awk or what?
- Previous by thread: Re: [tlug] sed or perl script help please . . .
- Next by thread: [tlug] Tokyo internships?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links