From 516817dd77f9154c22670da06a912d8e40dfa1ae Mon Sep 17 00:00:00 2001 From: Krzysztof Kielak Date: Thu, 14 Sep 2023 14:53:51 +0200 Subject: [PATCH] fix for different column order in new MacOSX --- ls++ | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ls++ b/ls++ index 194eb21..a74007d 100755 --- a/ls++ +++ b/ls++ @@ -175,6 +175,12 @@ sub ls { } elsif( ($^O eq 'darwin') or ($^O =~ /.+bsd$/) ) { ($perm, $hlink, $user, $group, $size, $day, $month, $time, $year, $file) = split(/\s+/, $line, 10); + + # apparntly new MacOSX changed the order of columnns + if (!($day =~ /\d+/)) { + ($day, $month) = ($month, $day); + } + chop($file); if( (!$day) ) { printf("%s", $line);