Filenames, Wildcards and Pathname Expansion: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 44: | Line 44: | ||
| * || Matches any number (including zero) of the single character (includigng a character specified by a regular expression) that immediately precedes it. | | * || Matches any number (including zero) of the single character (includigng a character specified by a regular expression) that immediately precedes it. | ||
|} | |} | ||
[[Category:Unix]] | |||
Revision as of 19:12, 13 January 2011
Regular Expressions
What is an expression? An expression doesn't literally mean what it says. An expression, even in computer technology, is not somethng to be interpreted literally. It is something that needs to be evaluated. An expression describes a result. An expression tells the computer how to produce a result.
Basic Wildcards
Wildcard Matches ? Any single character
- Any string of character
[set] Any character in set [!set] Any character not in set
password too short
aap
? a * a [set] [!set]
aap
| Special characters | Usage |
|---|---|
| row 1, cell 1 | row 1, cell 2 |
| row 2, cell 1 | row 2, cell 2 |
| Special characters |
Usage |
|---|---|
| . | Matches any single character except newline. In awk, dot can match newline also. |
| * | Matches any number (including zero) of the single character (includigng a character specified by a regular expression) that immediately precedes it. |