summaryrefslogtreecommitdiff
path: root/pr.pl
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-08 13:53:18 +0000
committerrsc <rsc>2006-09-08 13:53:18 +0000
commitec5783cbd2b52b3e566938fc8d07851e117005e2 (patch)
tree2619051217bd26ce96ede00089e17c361792c835 /pr.pl
parent72a590d9e50de4d361bb8f0f81e156abf5014f39 (diff)
downloadxv6-labs-ec5783cbd2b52b3e566938fc8d07851e117005e2.tar.gz
xv6-labs-ec5783cbd2b52b3e566938fc8d07851e117005e2.tar.bz2
xv6-labs-ec5783cbd2b52b3e566938fc8d07851e117005e2.zip
runoff changes
Diffstat (limited to 'pr.pl')
-rwxr-xr-xpr.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/pr.pl b/pr.pl
new file mode 100755
index 0000000..2e40b85
--- /dev/null
+++ b/pr.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+use POSIX qw(strftime);
+
+if($ARGV[0] eq "-h"){
+ shift @ARGV;
+ $h = $ARGV[0];
+ shift @ARGV;
+}else{
+ $h = $ARGV[0];
+}
+
+$page = 0;
+$now = strftime "%b %e %H:%M %Y", localtime;
+
+@lines = <>;
+for($i=0; $i<@lines; $i+=50){
+ print "\n\n";
+ ++$page;
+ print "$now $h Page $page\n";
+ print "\n\n";
+ for($j=$i; $j<@lines && $j<$i +50; $j++){
+ print $lines[$j];
+ }
+ for(; $j<$i+50; $j++){
+ print "\n";
+ }
+ $sheet = "";
+ if($lines[$i] =~ /^([0-9][0-9])[0-9][0-9] /){
+ $sheet = "Sheet $1";
+ }
+ print "\n\n";
+ print "$sheet\n";
+ print "\n\n";
+}