ELGLOB(1)
πΈ elglob(1) β the globbing-then-exec glow-up β¨
okay bestie, so this is the manual page for elglob, from the General Commands Manual section β section 1, commands, iykyk π
. sit down, grab a strawberry drink π, and let me tell you about the little tool that globs first and execs second.
β¨ NAME β¨
elglob β do a glob on a pattern, then run another program. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
prog...
π DESCRIPTION π
so elglob performs globbing[1] on pattern. yes, the same kind of globbing your shell does β the footnote link is right down there in SEE ALSO, no cap π₯
then it does variable substitution (cf. execline-substitute(7)) on prog..., using variable as the key and the result of the globbing as the value. the way that works is: variable becomes the name, the glob matches become the value π«
and the value is always split β it contains as many words as there are matches for the globbing pattern. always. no exceptions. it's giving "one word per match, periodt" π
after all that, elglob exec(3)s into the modified prog.... so like, it doesn't stick around, it becomes the program. main character energy fr fr β¨
π OPTIONS π
-vβ Verbose. if something goes wrong while globbing, it prints a warning message onstderr. just a little heads-up, not a whole meltdown π«Ά-wβ Strict. if something goes wrong while globbing, it dies immediately. and ngl the man page itself says this is harsh β you probably don't need that option π like, it's a lot.-sβ Sort the matches. by default the results are left unsorted, so if you care about order, this is your girl π-mβ Mark. appends a slash to each word that corresponds to a directory. cute little directory flag, iconic π-eβ No escape. treats backslashes inpatternliterally; does not allow quoting of metacharacters inpatternvia backslashes. β οΈ warning: theexeclineb(1)launcher uses the backslash as their own escape character β so if you want a backslash to actually be passed toelglob, do not forget to double it. do not forget. i'm serious. double it π-0β Null globbing. by default, ifpatternmatches nothing, it gets substituted as-is (verbatim, in one word). with this option, ifpatternmatches nothing, it's properly substituted as zero words. zero. nothing. the void π³οΈ-nβ Chomp. don't add an ending delimiter at the end of the word. only valid with the-doption, see below π-ddelim β Do not split the value. instead, make it one word, where the results of the globbing are separated by the first character ofdelim. if the-noption is not given, the first character ofdelimalso appears after the last result. and ifdelimis 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)). fancy, right? π§
πΈ 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)
and that's the whole page bestie, you ate π this one shipped with Debian, dated June 8, 2024, and lives at the very bottom of ELGLOB(1) like a little footer bow π mwah, go glob something gorgeous ππ¦
π¦ where this page comes from
- nixpkgs unstable: execline 2.9.9.2
- nixpkgs unstable: execline-man-pages 2.9.9.1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms