Call ls only once, to get nice columnar output with newer coreutils.

(Note: Combining -f and -l may not work with all versions of ls)
This commit is contained in:
hjp 2004-06-12 22:25:46 +00:00
parent b8bd8e778a
commit a43fc516f4
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@
use strict;
my @pp;
for my $p (@ARGV) {
my @p = split (/\//, $p);
@ -9,6 +10,7 @@ for my $p (@ARGV) {
my $pp = join("/", @p[0..$i]);
$pp = "/" if $pp eq "";
system("/bin/ls", "-ldi", $pp);
push (@pp, $pp);
}
}
system("/bin/ls", "-fldi", @pp);