OILS / test / gold / glob.sh View on Github | oilshell.org

26 lines, 7 significant
1#!/usr/bin/env bash
2#
3# Usage:
4# ./03-glob.sh <function name>
5
6# Evaluates to command and arg
7spec/testdata/echo.s[h-j]
8
9# Negation
10spec/testdata/echo.s[!i-z]
11spec/testdata/echo.s[!i]
12
13spec/testdata/echo.*
14
15spec/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
25echo classes
26spec/testdata/echo.s[[:alpha:]]