File: makedir.pl

package info (click to toggle)
xconq 7.2.2-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,296 kB
  • ctags: 9,199
  • sloc: ansic: 107,849; sh: 2,108; perl: 2,057; makefile: 1,177; sed: 161; csh: 50; awk: 49; lisp: 39
file content (20 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /usr/unsupported/bin/perl
foreach $file (@ARGV) {
    open(IMF,"<$file") || warn "Cannot open $file.\n";
    while (<IMF>) {
	if (/imf\s*\"([^\"]*)\"/) {
	    $imf = $1;
	    if ($where{$imf} && $where{$imf} ne $file) {
		warn "Family $imf present in files $where{$imf} and $file.\n";
	    } else {
		$where{$imf} = $file;
	    }
	}
    }
}

print "ImageFamilyName FileName\n";
foreach $imf (sort keys(%where)) {
    print "$imf $where{$imf}\n";
}
print ". .\n";