C Shell - Overview of The Language - Basic Statements - Wildcarding

Wildcarding

The C shell, like all Unix shells, treats any command-line argument that contains wildcard characters as a pattern and replaces it with the list of all the filenames that match.
* matches any number of characters.
? matches any single character.
matches any of the characters inside the square brackets. Ranges are allowed, using the hyphen.
matches any character not in the set.
The C shell also introduced several notational conveniences, since copied by other Unix shells.
abc{def,ghi} is alternation and expands to abcdef and abcghi.
~ means the current user's home directory.
~user means user's home directory.
Multiple directory-level wildcards, e.g., "*/*.c", are supported.
Giving the shell the responsibility for interpreting wildcards was an important decision on Unix. It meant that wildcards would work with every command, and always in the same way. However, the decision relied on Unix's ability to pass long argument lists efficiently through the exec system call that csh uses to create child processes. By contrast, on Windows, wildcard interpretation is conventionally performed by each application. This is a legacy of MS-DOS, which only allowed a 128-byte command line to be passed to an application, making wildcarding by the DOS command prompt impractical. Although modern Windows can pass command lines of up to roughly 32K Unicode characters, the burden for wildcard interpretation remains with the application.

Read more about this topic:  C Shell, Overview of The Language, Basic Statements