G
Ga
Hi all,
I have two files (some thousends of files in pairs, indeed...), file1 and
file2. File2 looks similar to file1, but:
- it contains more data than file1 (and such info is what I need to get)
- it is formatted differently
Example:
File1:
Divitias alius fulvo sibi congerat auro Et teneat culti iugera multa soli,
Me mea paupertas vita traducat inerti, Dum meus adsiduo luceat igne focus.
File2:
Divitias alius fulvo sibi congerat auro
Et teneat culti iugera multa soli,
Quem labor adsiduus vicino terreat hoste,
Martia cui somnos classica pulsa fugent.
Me mea paupertas vita traducat inerti,
Dum meus adsiduo luceat igne focus.
In the example file2 contains the same *data* as file1 (rows 1,2,5,6), but
formatted differently. What I would like to do is a script to get rows 3
and 4 of file2 without losing it's format (tabs, spaces and newlines).
I played a little with regexp and nested cycles on both files but it's
really becoming too complicated and I think there should be some "easy-
way" I'm missing.
Any hint, anybody?
Thanx alot.
G.
I have two files (some thousends of files in pairs, indeed...), file1 and
file2. File2 looks similar to file1, but:
- it contains more data than file1 (and such info is what I need to get)
- it is formatted differently
Example:
File1:
Divitias alius fulvo sibi congerat auro Et teneat culti iugera multa soli,
Me mea paupertas vita traducat inerti, Dum meus adsiduo luceat igne focus.
File2:
Divitias alius fulvo sibi congerat auro
Et teneat culti iugera multa soli,
Quem labor adsiduus vicino terreat hoste,
Martia cui somnos classica pulsa fugent.
Me mea paupertas vita traducat inerti,
Dum meus adsiduo luceat igne focus.
In the example file2 contains the same *data* as file1 (rows 1,2,5,6), but
formatted differently. What I would like to do is a script to get rows 3
and 4 of file2 without losing it's format (tabs, spaces and newlines).
I played a little with regexp and nested cycles on both files but it's
really becoming too complicated and I think there should be some "easy-
way" I'm missing.
Any hint, anybody?
Thanx alot.
G.