ELGLOB(1)

NAME
elglob - perform globbing on a pattern, then execute another program

SYNOPSIS
elglob [-v] [-w] [-s] [-m] [-e] [-0] [-n] [-d delim] variable pattern prog...

DESCRIPTION
elglob performs globbing[1] on pattern.

It then performs variable substitution ( cf. execline-substitute(7)) on prog..., using variable as key and the result of the globbing as value. The value is always split: it contains as many words as they are matches for the globbing pattern.

elglob then exec(3) s into the modified prog....

OPTIONS

-v  Verbose. If there is a problem while globbing, print a warning message on stderr.

-w  Strict. If there is a problem while globbing, die immediately. This is harsh - you probably don't need that option.

-s  Sort the matches. By default, the results are left unsorted.

-m  Mark. Append a slash to each word that corresponds to a directory.

-e  No escape. Treat backslashes in pattern literally; do not allow quoting of metacharacters in pattern via backslashes. Warning: the execlineb(1) launcher uses the backslash as their own escape character — if you want a backslash to be passed to elglob, do not forget to double it.

-0  Null globbing. By default, if pattern matches nothing, it will be substituted as is ( verbatim in one word). With this option, if pattern matches nothing, it will be properly substituted as zero word.

-n  Chomp. Don't add an ending delimiter at the end of the word. Only valid with the -d option, see below.

-d delim
    Do not split the value. Instead, make it one word, where the result of the globbing are separated by the first character of delim. If the -n option is not given, the first character of delim also appears after the last result. If delim is the empty string, the values are encoded as a sequence of netstrings into a single word ( and you can later separate the words with e.g. ‘define -s’ — cf. define(1)).

SEE ALSO
define(1), elgetpositionals(1), execlineb(1), importas(1), multidefine(1), multisubstitute(1), execline-substitute(7)

[1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/glob.html

This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/elglob.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)