Filenames, Wildcards and Pathname Expansion

From RoggeWiki
Revision as of 22:40, 1 January 2011 by Tom (talk | contribs)
Jump to navigation Jump to search

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


Summary of Metacharacters
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.