|
Revision 6972, 0.7 kB
(checked in by bergie, 6 years ago)
|
Fixing tmp file names
|
- Property svn:eol-style set to
native
- Property svn:executable set to
*
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
$admin_user_guid = "f6b665f1984503790ed91f39b11b5392"; |
|---|
| 8 |
|
|---|
| 9 |
local $/; |
|---|
| 10 |
|
|---|
| 11 |
open FILE, "< $ARGV[0]"; |
|---|
| 12 |
$xml = <FILE>; |
|---|
| 13 |
close FILE; |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
$xml =~ s/<person(.*?)id="$admin_user_guid"(.*?)changed="(\d+)"(.*?)>/<person${1}id="$admin_user_guid"$2changed="19980101000000"$4>/; |
|---|
| 19 |
|
|---|
| 20 |
open FILE2, "> /tmp/$1.$$"; |
|---|
| 21 |
print FILE2 $xml; |
|---|
| 22 |
close FILE2; |
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
system("mv", "/tmp/$1.$$", $ARGV[0]); |
|---|
| 28 |
unlink("/tmp/$1.$$"); |
|---|