extglob Extended Pattern-Matching Operators

The operators in Table A-20 apply when using shopt -s extglob. Matches are case-sensitive, but you may use shopt -s nocasematch (bash 3.1+) to change that. This option affects case and [[ commands.

Table A-20. extglob extended pattern-matching operators

Grouping

Meaning

@( … )

Only one occurrence

*( … )

Zero or more occurrences

+( … )

One or more occurrences

?( … )

Zero or one occurrences

!( … )

Not these occurrences, but anything else

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.241.228