Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added a tesh colorizer simple script.
[simgrid.git] / tools / tesh / colorize.pl
diff --git a/tools/tesh/colorize.pl b/tools/tesh/colorize.pl
new file mode 100755 (executable)
index 0000000..247c433
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -w
+use Term::ANSIColor qw{:constants};
+$Term::ANSIColor::AUTORESET = 1;
+
+while(<>){
+    if($_ =~ m/^[-]\s.*/){
+       print BOLD RED $_;
+    }elsif ($_ =~ m/^[+]\s.*/){
+       print BOLD GREEN $_;
+    }else{
+       print BOLD $_;
+    }
+}
+
+