Web hosting solutions - ? This matches any one character.

? This matches any one character. […] This matches any one of the characters between the brackets, which can include a dash-separated range of letters or numbers. To try out some of these file-matching metacharacters, go to an empty directory (such as the test directory described in the previous section) and create some files. Here s an example of how to create some empty files: $ touch apple banana grape grapefruit watermelon The next few commands show you how to use shell metacharacters to match file names so they can be used as arguments to the ls command. Using metacharacters shown below, you can match the file names you just created with the touch command. Type the following commands and see if you get the same responses: $ ls a* apple $ ls g* grape grapefruit $ ls g*t grapefruit $ ls *e* apple grape grapefruit watermelon $ ls *n* banana watermelon The first example matches any file that begins with an a (apple). The next example matches any files that begin with g (grape, grapefruit). Next, files beginning with g and ending in t are matched (grapefruit). Next, any file that contains an e in the name is matched (apple, grape, grapefruit, watermelon). Finally, any file that contains an n is matched (banana, watermelon). Here are a few examples of pattern matching with the question mark (?): $ ls ????e apple grape $ ls g???e* grape grapefruit The first example matches any five-character file that ends in e (apple, grape). The second example matches any file that begins with g and has e as its fifth character (grape, grapefruit). Here are a few examples of using braces to do pattern matching: $ ls [abw]* apple banana watermelon $ ls [agw]*[ne] apple grape watermelon In the first example, any file beginning with a, b, or w is matched. In the second, any file that begins with a, g, or w and also ends with either n or e is matched. Using file-redirection metacharacters Commands receive data from standard input and send it to standard output. Using pipes (described earlier), you can direct standard output from one command to the standard input of another. With files, you can use less than (<) and greater than (>) signs to direct data to and from files. Here are the file redirection characters:
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Leave a Reply