Revision bc35b8e435cc1036db65a94a026247e8746543d0 authored by Dr. Stephen Henson on 01 December 2013, 23:09:44 UTC, committed by Dr. Stephen Henson on 01 December 2013, 23:09:44 UTC
1 parent 6859f3f
dirname.pl
#!/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);

Computing file changes ...