Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: reading through dated directories

by choroba (Archbishop)
on Jun 17, 2021 at 20:03 UTC ( #11133972=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    SHELL = /bin/bash
    
    ...
    compare:
        diff <(glob.pl | sort) <(readdir.pl | sort)
        diff <(glob.pl | sort) <(path.pl | sort)
    
  2. or download this
    #! /bin/bash
    now=$(date +%s)
    ...
        done 2>/dev/null
        echo $d >&2
    done
    
  3. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    for my $dir (glob '???/') {
        say substr +(glob "$dir*/")[-1], 0, -1;
    }
    
  4. or download this
    #!/usr/bin/perl
    use warnings;
    ...
            say $date if $date->basename > $now;
        }
    }
    
  5. or download this
    #!/usr/bin/perl
    use warnings;
    ...
            say "$pdir/$date" if $date > $now;
        }
    }
    
  6. or download this
    make glob    > /dev/null
    
    ...
    real    0m0.440s
    user    0m0.380s
    sys    0m0.060s
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133972]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2021-09-16 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?