aboutsummaryrefslogtreecommitdiff
path: root/scripts/alternate-stream
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/alternate-stream')
-rwxr-xr-xscripts/alternate-stream26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/alternate-stream b/scripts/alternate-stream
new file mode 100755
index 00000000..6a711722
--- /dev/null
+++ b/scripts/alternate-stream
@@ -0,0 +1,26 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+open(FH, $ARGV[0]);
+open(OFH_ONE, "> ".$ARGV[1]);
+open(OFH_TWO, "> ".$ARGV[2]);
+
+my $line;
+my $alt = 0;
+
+while ( $line = <FH> ) {
+
+ if ( $line =~ /^Reflections\ from\ indexing/ ) {
+ $alt = 1 - $alt;
+ }
+
+ if ( $alt == 0 ) {
+ printf(OFH_ONE $line);
+ } elsif ( $alt == 1 ) {
+ printf(OFH_TWO $line);
+ } else {
+ printf("Unhandled: '%s'\n", chomp($line));
+ }
+
+}