Insert text and compare to prove the insertion

S

siemi1

Hi,

I am busy with some conversion for which perl is the best way to do it
I guess. I am converting from back from some sort of zipfile to plain
text. That can only be done with a tool from the supplier. The next
step is to insert some text in the reportnames. I have the following
command for that:
perl -p -i.orig -e "BEGIN {@ARGV = map { glob } @ARGV } s/REPORT:
/REPORTTEST: /g" *.txt

That works fine. It updates all the reportnames in all the textfiles
correctly. But, as part of the conversion I have to create a report of
the changes before importing it in the new system. Thats where I am
having problems. The process has to run without human interference from
legal point of view. I am compare the reports one by one by windiff,
but I can not automate that. So, I created a listing from the report
files with dir *.txt /b > input.bat with good old dos. Then I run a
perl script to insert the windiff command to compare, put the results
in a txt file and exit:
perl -p -i.orig -e "s/^/windiff -Fx compare.txt . .\\test2\\ /"
input.bat
However, windiff overwrites the compare.txt file. So, I need to do the
compare differently (not windiff) or be able to created unique
(=sequenced) output files.

My knowledge of perl is just not good enough to be able to trigger this
problem. I hope there is someone who can give some tips or some help to
trigger this for me nasty problem. The maximum number of files should
be 500 per run.

Your help is appreciated!!

Michel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,171
Messages
2,570,935
Members
47,472
Latest member
KarissaBor

Latest Threads

Top