DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦2cb558ce7⟧ TextFile

    Length: 463 (0x1cf)
    Types: TextFile
    Names: »fgrep.pl«

Derivation

└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
    └─⟦3da311d67⟧ »./cops/1.04/cops_104.tar.Z« 
        └─⟦6a2577110⟧ 
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
    └─⟦6a2577110⟧ »./cops/1.04/cops_104.tar« 
            └─⟦this⟧ »cops_104/perl/fgrep.pl« 

TextFile

#
#  Just a quick perl fgrep...
#
package fgrep;

sub main'fgrep {
    local($file, @exprs) = @_;
    local(@list);

    if (open file) {
	$code = "while (<file>) {\n\tchop;\n";
	for (@exprs) {
	    $code .= "\tpush(\@list, \$_), next if m\201${_}\201;\n";
	} 
	$code .= "}\n";
	warn "fgrep code is $code" if $debug;
	eval $code;
	warn "fgrep @exprs $file: $@\n" if $@;
    } elsif ($debug) {
	warn "main'fgrep: can't open $file: $!\n";
    } 

    @list;
} 

1;