3 ms·
Globbing is also more complex than it seems on first blush. Alternation is supported in bash. Stuff like "echo ∗.{png,jp{e,}g}" (utf8 asterisk to get around H
by tyingq 7y ago
Globbing is also more complex than it seems on first blush.
Alternation is supported in bash. Stuff like "echo ∗.{png,jp{e,}g}" (utf8 asterisk to get around HN, cut/paste won't work).
That bsd derived glob is useful for some sometimes useful tricks. Like in Perl:
use File::Glob qw/bsd_glob/;
my @list = bsd_glob('This {list|stuff} is nested {{very,quite} deeply,deep}');
- acqq 7y ago> "echo ∗.{png,jp{e,}g}" (utf8 asterisk to get around HN, cut/paste won't work) This works: echo *.{png,jp{e,}g} Note ∗ ⟵ U+2217 * ⟵ needed ASCII asterisk Just put the code examples in the separate lines, prefixed with spaces.