Task

Walk a given directory and print the names of files matching a given pattern.

(How is "pattern" defined? substring match? DOS pattern? BASH pattern? ZSH pattern? Perl regular expression?)


Note: This task is for non-recursive methods.   These tasks should read a single directory, not an entire directory tree.

Note: Please be careful when running any code presented here.



Related task

   Walk Directory Tree   (read entire directory tree). 


; list all files at current path
print list "."
 
; get all files at given path
; and select only the ones we want
 
; just select the files with .md extension
select list "some/path" 
    => [".md" = extract.extension]
 
; just select the files that contain "test"
select list "some/path" 
    => [in? "test"]