Walk a directory/Recursively: Difference between revisions

Content added Content deleted
(added Clojure version)
(Add zsh)
Line 906: Line 906:
Find accepts file globbing params too as -name, here I use regexp from grep.
Find accepts file globbing params too as -name, here I use regexp from grep.
<lang bash>find . | grep '.*\.txt$'</lang>
<lang bash>find . | grep '.*\.txt$'</lang>

=={{header|UnixPipes}}==
Zsh has recursive globbing. The GLOB_DOTS option allows files beginning with a period to be matched.
<lang zsh>setopt GLOB_DOTS
print -l -- **/*.txt</lang>
GLOB_DOTS can be set temporarily with the 'D' modifier.
<lang zsh>print -l -- **/*.txt(D)</lang>


{{omit from|TI-89 BASIC}} <!-- Does not have a filesystem, just namespaced variables, which can't be listed from a program. -->
{{omit from|TI-89 BASIC}} <!-- Does not have a filesystem, just namespaced variables, which can't be listed from a program. -->