/usr/share/sumo/tools/xml2cvs.pl is in sumo-tools 0.15.0~dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | if(!defined($ARGV[1])) {
print "Syntax-Error!\n";
print "Syntax: xml2cvs.pl <FILENAME> <TAGNAME>\n";
print " Prints all attributes in the order of their occurence from the given tag of the given file.\n";
die;
}
$tag = "\<".$ARGV[1];
open(INDAT, "< $ARGV[0]") || die "Could not open ".$ARGV[0];
while(<INDAT>) {
$tmp = $_;
if($tmp =~ $tag) {
$beg = index($tmp, "\"");
while($beg!=-1) {
$end = index($tmp, "\"", $beg+1);
print substr($tmp, $beg+1, $end-$beg-1);
print ";";
$beg = index($tmp, "\"", $end+1);
}
print "\n";
}
}
close(INDAT);
|