I've written a simple ls program that actually works :-)

This commit is contained in:
Warren Toomey
2016-03-03 13:36:35 +10:00
parent 553aa31967
commit 9cc938bfe6
2 changed files with 57 additions and 1 deletions
+2 -1
View File
@@ -673,7 +673,8 @@ sub opensomething {
open( $FH, ">", $tempfile) || return(undef);
dprintf("Converting directory $filename\n");
while ( my $name= readdir($dh)) {
my @list= sort(readdir($dh));
foreach my $name (@list) {
printf( $FH "%-8s", substr( $name, 0, 8 ) );
}
closedir($dh);