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:
parent
b8bd8e778a
commit
a43fc516f4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue