1 | #!/usr/bin/env bash
|
2 | #
|
3 | # Usage:
|
4 | # ./03-glob.sh <function name>
|
5 |
|
6 | # Evaluates to command and arg
|
7 | spec/testdata/echo.s[h-j]
|
8 |
|
9 | # Negation
|
10 | spec/testdata/echo.s[!i-z]
|
11 | spec/testdata/echo.s[!i]
|
12 |
|
13 | spec/testdata/echo.*
|
14 |
|
15 | spec/testdata/echo.s?
|
16 |
|
17 | # NOTE: bash also has extglob
|
18 | # http://mywiki.wooledge.org/glob
|
19 | #
|
20 | # nullglob -- non-matching arguments get expand to nothing
|
21 | # failglob -- non-matching arguments are an error
|
22 | # dotglob -- dot files are matched
|
23 | # globstar -- ** for directories
|
24 |
|
25 | echo classes
|
26 | spec/testdata/echo.s[[:alpha:]]
|