Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added a tesh colorizer simple script.
authorvelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 15 Apr 2010 15:05:38 +0000 (15:05 +0000)
committervelho <velho@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 15 Apr 2010 15:05:38 +0000 (15:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7601 48e7efb5-ca39-0410-a469-dd3cf9ba447f

tools/tesh/colorize.pl [new file with mode: 0755]

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 $_;
+    }
+}
+
+