#! /usr/bin/perl -w use Shell; use Text::Table; @cvsoutput = cvs("editors","2>","/dev/null"); use Term::ANSIColor; @header1 = {title=>' File'}; @header2 = {title=>' User'}; @header3 = {title=>' Date'}; @header4 = {title=>' Host'}; @seperator = {title=>'|',body=>'|',is_sep=>'1'}; $t = new Text::Table(@seperator,@header1,@seperator,@header2,@seperator,@header3,@seperator,@header4,@seperator); foreach $cvsoutput (@cvsoutput) { if (substr($cvsoutput,0,1) eq "?") {} else { @first=split(/\s+/,$cvsoutput,11); pop(@first); @data = (" ".$first[0]." ", " ".$first[1]." ", " ".join(" ",$first[2],$first[3],$first[4],$first[5],$first[6])." "," ".$first[8]." "); $t->add(@data); } } print "\n",$t->rule('-','+'),$t->title,$t->rule( '-', '+'); foreach $body ($t->body) { print $body,$t->rule( '-', '+'); } print "\n";