From a43fc516f4f75043c98ad6098d1111ceb3d3d54f Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 12 Jun 2004 22:25:46 +0000 Subject: [PATCH] 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) --- lspath/lspath.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lspath/lspath.pl b/lspath/lspath.pl index af81d59..f1cab7d 100755 --- a/lspath/lspath.pl +++ b/lspath/lspath.pl @@ -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);