Actions Status

NAME

glob - optex filter to glob filenames

SYNOPSIS

optex -Mglob [ option ] pattern -- command

DESCRIPTION

This module is used to select filenames given as arguments by pattern.

For example, the following will pass only files matching *.c from */* as arguments to ls.

optex -Mglob '*.c' -- ls -l */*

Only existing file names will be selected. Any arguments that do not correspond to files will be passed through as is. In this example, the command name and options remain as they are because no corresponding file exists. Be aware that the existence of a corresponding file for unexpected parameter could lead to confusing results.

There are several unique options that are valid only for this module.

CONSIDERATION

You should also consider using the extended globbing (extglob) feature of bash(1) or similar. For example, you can use !(*.EN).md, which would specify files matching *.md minus those matching *.EN.md.

AUTHOR

Kazumasa Utashiro

LICENSE

Copyright ©︎ 2024-2025 Kazumasa Utashiro.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.