Commit | Line | Data |
---|---|---|
9ba4af2b PH |
1 | # Perl script to print all lines starting "-local" from -H files |
2 | ||
3 | opendir(DIR, "spool/input") || die "failed to opendir spool/input\n"; | |
4 | @spools = readdir(DIR); | |
5 | closedir(DIR); | |
6 | ||
7 | foreach $f (@spools) | |
8 | { | |
9 | next if $f !~ /-H$/; | |
10 | open(IN, "<spool/input/$f") || die "failed to open spool/input/$f\n"; | |
11 | print "$f\n"; | |
12 | while(<IN>) { print if /^-local/; } | |
13 | close(IN); | |
14 | } | |
15 | ||
16 | #### |