Ksh file name substitution

Created by Alin Brindusescu on 2011-02-23 04:22:55
? match any single character
* match zero or more characters, including null
[abc] match any character or characters between the brackets
[x-z] match any character or characters in the range x to z
[a-ce-g] match any character or characters in the range a to c, e to g
[!abc] match any character or characters not between the brackets
[!x-z] match any character or characters not in the range x to z
. strings starting with . must be explicitly matched
?(pattern-list) match zero or one occurrence of any pattern
*(pattern-list) match zero or more occurrences of any pattern
+(pattern-list) match one or more occurrence of any pattern
@(pattern-list) match exactly one occurrence of any pattern
!(pattern-list) match anything except any pattern
| multiple patterns must be separated with a | character



Comments: work in progress!

Search

Ads