Sample I-Spy Filters


Keep filter list:

This filter list will only retain items that contain .txt; thus, likely text files with the ".txt" suffix. #+ .txt


Omit filter list:

Such a filter list will discard all items that contain .zip or .bin; thus, likley ignoring zipped or binary files while keeping the rest. #- .zip .bin


Untagged filter list:

Lacking a tag (#- or #+) on the first line, all entries of this filter list will be treated as omit filters; thus, only items not containing patterns below will be retained. nwt art per 00


Perl script filter:

#!/usr/bin/perl # List filter.pl; an example list filter for the Eudora beta directory at Qualcomm # This script extracts lines containing files from a directory dump # # 12/22/95 Version 1.0 # This script is free, public domain, no strings attached. # Igor Livshits <igorl@uiuc.edu> $argumentCounter= 0; $openToWrite= "> "; $newLineDelimiter= "\n"; $spaceDelimiter= " "; $realFileTag= "-r"; # Read in the arguments passed to us by the caller # $sourceFile= $ARGV[$argumentCounter++]; $targetFile= $ARGV[$argumentCounter++]; # Extract just the file names # open(sourceFile, $sourceFile) || die "Cannot open $sourceFile: $!"; open(targetFile, $openToWrite . $targetFile) || die "Cannot open $targetFile: $!"; while ($aLine= <sourceFile>) { # Scan the input file line by line if ($aLine =~ /^$realFileTag/) { # Data files are listed on lines that start with a -r @aLine= split($spaceDelimiter, $aLine); # File names do not contain spaces print (targetFile (pop(@aLine))); # And the last such item is the file path and name } } close(sourceFile); close(targetFile);


Return to the table of contents or to the discussion of filters.
ISL [12/27/95]