Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / examples / platforms / syscoord / generate_peer_platform.pl
index a94a7ce..d5eccd1 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 
-# Copyright (c) 2011-2018. The SimGrid Team.
+# Copyright (c) 2011-2023. The SimGrid Team.
 # All rights reserved.
 
 # This program is free software; you can redistribute it and/or modify it
@@ -23,12 +23,12 @@ open INPUT, $ARGV[0] or die "Unable to open $ARGV[1]: $!\n";
 while(defined($line=<INPUT>))
 {
     next if ($line =~ /^#/);
-    # 278 7.2 -9.4 h 2.3 
-    if($line =~ /^([^ ]*) ([^ ]*) ([^ ]*) h ([^ ]*) *$/) {
+    # 278 7.2 -9.4 h 2.3
+    if($line =~ /^(\S*) (\S*) (\S*) h (\S*) *$/) {
        print "\t\t<peer id=\"peer-$1\" coordinates=\"$2 $3 $4\" speed=\"730Mf\" bw_in=\"13.38MBps\" bw_out=\"1.024MBps\"/>\n";
        next;
     }
     die "Parse error: $line\n";
-}                      
+}
 print "\t</AS>\n";
 print "</platform>\n";