Name
for_recursive_glob
- for_recursive_glob
var dirlist globlist code
Perform a foreach -style loop over files that match patterns. All directories in the list
dirlist
are recursively searched for files that match the glob patterns in listgloblist
. For each matching file the variablevar
is set to the file path and codecode
is evaluated.
Example
for_recursive_glob file {˜ /tmp} {*.tcl *.c *.h} { echo $file }
Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.