01-19-2011
3,
0
Join Date: Jan 2011
Last Activity: 20 January 2011, 8:59 AM EST
Posts: 3
Thanks Given: 2
Thanked 0 Times in 0 Posts
Linux novice - Search and delete
Hi unix masters,
Im needing some guidance or a small code to enlight my problem.
Problem Example:
I have 3 different text ascii files. At each file, inside the text
have repeater marks.
--text 1 start--
123 -> mark
anytextanytext
anythinganything
123 ->mark
blahblah
blah
...
123->mark
...
--text 1 end--
Each file is different BUT some blocks of text, after the marker, are repeated
in the other file.
What im planning to do is merge all 3 files in 1. Find the repeated blocks
between the marks and delete the repeated parts leaving only 1 of
them. And dont delete the others non repeated blocks. I dont need sort the
blocks. Save the result in a new file.
I couldnt find a sourcecode (any language) or an program to do
what i need or to guide me. In the example is with only 3 files but
i need run the rotine at 350 files with thousand of blocks inside each file *dies*.
Should i use bash, pearl, python, emacs, some text processor? Some one
know a done code close to what i need to download? My skills are enough
to modify a file but i unable for now to code something from zero.
Thanks in advance guys!