Menu

[r1148]: / trunk / ext / openssl / util / dirname.pl  Maximize  Restore  History

Download this file

19 lines (14 with data), 268 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/usr/local/bin/perl
if ($#ARGV < 0) {
die "dirname.pl: too few arguments\n";
} elsif ($#ARGV > 0) {
die "dirname.pl: too many arguments\n";
}
my $d = $ARGV[0];
if ($d =~ m|.*/.*|) {
$d =~ s|/[^/]*$||;
} else {
$d = ".";
}
print $d,"\n";
exit(0);
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.