Rev | Line | |
---|
[1350] | 1 | #!/usr/local/bin/perl |
---|
| 2 | # |
---|
| 3 | # Created: Stefano Magni, August 1998 |
---|
| 4 | # |
---|
| 5 | # Modified: J.Apostolakis September 11, 1998 |
---|
| 6 | # |
---|
| 7 | |
---|
| 8 | # replaceIDs file |
---|
| 9 | |
---|
| 10 | while (@ARGV){ |
---|
| 11 | $file= shift @ARGV; |
---|
| 12 | |
---|
| 13 | open(FILE, $file) || die "Cannot open $file!\n"; |
---|
| 14 | $tmp= "/tmp/lof"; |
---|
| 15 | open(TMP, ">$tmp") || die "Cannot open temp file!\n"; |
---|
| 16 | |
---|
| 17 | while (<FILE>) { |
---|
| 18 | |
---|
| 19 | $_ =~ s/\bTst10/Sc01/g ; |
---|
| 20 | $_ =~ s/\~Tst10/\~Sc01/g ; |
---|
| 21 | print TMP $_; |
---|
| 22 | } |
---|
| 23 | close(TMP); |
---|
| 24 | close(FILE); |
---|
| 25 | system("mv -f $file .bak.$file"); |
---|
| 26 | system("mv -f $tmp $file"); |
---|
| 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.