From 9695eab2909252a352e521d354d0c6c70de27210 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 15 Aug 2011 14:41:07 +0200 Subject: Add scripts/indexed-filenames --- scripts/indexed-filenames | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 scripts/indexed-filenames (limited to 'scripts') diff --git a/scripts/indexed-filenames b/scripts/indexed-filenames new file mode 100755 index 00000000..842d264d --- /dev/null +++ b/scripts/indexed-filenames @@ -0,0 +1,32 @@ +#!/usr/bin/perl -w + +use strict; + +open(FH, $ARGV[0]); + +my $line; +my $is_indexed; +my $filename; + +while ( $line = ) { + + if ( $line =~ /^-----\ Begin chunk\ -----$/ ) { + $is_indexed = 0; + } + + if ( $line =~ /^Image\ filename: (.*)$/ ) { + $filename = $1; + } + + if ( $line =~ /^Cell\ parameters/ ) { + $is_indexed = 1; + } + + if ( $line =~ /^-----\ End chunk\ -----$/ ) { + if ( $is_indexed ) { + printf("%s\n", $filename); + } + } + + +} -- cgit v1.2.3