Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created May 1, 2017 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/9bf8ed50c2c75e144c1d676cbef83f9c to your computer and use it in GitHub Desktop.
Save gfldex/9bf8ed50c2c75e144c1d676cbef83f9c to your computer and use it in GitHub Desktop.
use v6.c;
my $build-log-regex = /.log“ $ / ; # filename to search for
my $start-dir = "/var/"; # directory to start in
sub get-build-logs($current-dir) {
for try dir($current-dir) {
.Str.say if .f && .basename ~~ $build-log-regex;
.&?ROUTINE if .d;
}
}
# calling function
get-build-logs($start-dir);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment