File: realpath

package info (click to toggle)
tct 1.19-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,916 kB
  • ctags: 1,128
  • sloc: perl: 9,609; ansic: 5,347; makefile: 430; sh: 38
file content (24 lines) | stat: -rw-r--r-- 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl5

#
#  Prints out the real pathname of file(s); usage:
#
#		$0 file[s]
#
#  Prints out warning to stderr if file doesn't exist.
#
#

$running_under_grave_robber = 1;

$TCT_HOME = "";
require "$TCT_HOME/conf/coroner.cf";
require "realpath.pl";

for (@ARGV) {
	$path = &realpath($_);
	if ($path) { print $path, "\n"; }
	else       { warn "File $_ doesn't exist\n"; }
	}

1;