File: getpath

package info (click to toggle)
dnssec-tools 1.13-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 16,064 kB
  • sloc: perl: 44,399; ansic: 31,547; cpp: 21,306; sh: 15,813; xml: 2,113; makefile: 1,390; pascal: 836; python: 290; csh: 11
file content (12 lines) | stat: -rw-r--r-- 212 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl

open(I,"paths");
while (<I>) {
    chomp($_);
    @a = /(\S+) (.*)/;
    $a[1] .= "/" if ($a[1] !~ /\/$/);
    $paths{$a[0]} = $a[1];
    $paths{"$a[0].orig"} = $a[1];
}

print $paths{$ARGV[0]};