From 3dc59d2c5d138c2fc31559681ecc1967789f15c9 Mon Sep 17 00:00:00 2001 From: velho Date: Thu, 15 Apr 2010 15:05:38 +0000 Subject: [PATCH] Added a tesh colorizer simple script. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7601 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- tools/tesh/colorize.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/tesh/colorize.pl diff --git a/tools/tesh/colorize.pl b/tools/tesh/colorize.pl new file mode 100755 index 0000000000..247c433569 --- /dev/null +++ b/tools/tesh/colorize.pl @@ -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 $_; + } +} + + -- 2.20.1