eol
[xonotic/netradiant.git] / docs / developer / RegExp / replace.pl
1 #!perl
2 rename("$ARGV[0]", "$ARGV[0].old");
3 open(FILE, "$ARGV[0].old");
4 open(OFILE, ">$ARGV[0]");
5 while(<FILE>)
6 {
7 if($. != $ARGV[1])
8 {
9 print OFILE;
10 next;
11 }
12 s/Sys_Printf \(/Sys_FPrintf \(SYS_VRB,/;
13 s/Sys_Printf\(/Sys_FPrintf \(SYS_VRB,/;
14 print OFILE;
15 }
16 close(OFILE);
17 close(FILE);