multiple changes on multiple lines

D

Dave

Hello

I would appreciate tips where I can find a base for re programming or
where a can buy perl script with this functions

I have a file that need multiple changes on multiple lines


replaceblock.pl FileToChange.txt blockreplace.txt

example FileToChange.txt

line 1 /*
line 2 [00.893]
line 3 text2
line 4 text3
line 5 /* explanation
line 6 /* text
line 7 text [0.456.] text
line 8 text8
line 9 test ("text9"), text [35.989 , 67.88 , 33.02]
line 10 text text text
line 11 text [2.5] text
line 12 text 55
line 13 text and numbers with programming symbols....
line 14 text14

example blockreplace.txt

[start block] /* replacing line 2 and 3
[00.893]
text2
[end block]
[start replace block]
[2.15]
text2 with more text
[end replace block]

[start block] /* replacing line 9, 10 and 11
test ("text9"), text [35.989 , 67.88 , 33.02]
text text text
text [2.5] text
[end block]
[start replace block]
test ("texzz9"), tezz [15.00 , 60.00 , 30.00]
tezz tezz tezz
[end replace block]

[start block]...... "numbers of blocks change from file to file"


newbie in perl

Ihave made a script 7 years ago, and havent used perl since.

Thanks

/Dave
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top