Like this CertiGuide? Get it in PDF format!
Click Here!

Custom Search







Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 5: The Linux Operating System
      9  Basic Concepts and Procedures for Creating, Viewing and Editing Files and Directories

Previous Topic/Section
Wildcard Characters
Previous Page
Pages in Current Topic/Section
1
Next Page
Match Negation
Next Topic/Section

Character Ranges

The [ ] allows one to place specific characters or numbers within the brackets which will be the only choices that can be matched within that character position. For example: the name hat[12]? will match the files hat11 hat12 hat13 hat21 hat22 hat23 . This statement is equivalent to either match all files that began with the characters hat followed by the number 1 or the number 2 followed by one additional character or number. A slightly different variation hat[12]* will match hat1 hat2 hat11 hat12 hat13 hat21 hat22 hat23. Notice that the file names hat1 hat2 are now added to list since this new combination will match all files that start with hat followed by the number 1 or the number 2 followed by zero or any number of additional characters. As a result the files hat1 hat2 are now included in this list.

Ranges of characters can be included by using the notation: [a-m], where a is the beginning of the range of characters to be matched and m is the last. This would match all of the characters starting with a going to m inclusive (remember Linux is case sensitive so this would not include any uppercase characters). Looking again at the list of file names using h[a-m]* would match the filenames hat hat1 hat2 hat11 hat12 hat13 hat21 hat22 hat23 hat31 hat32 hat33 head. Notice that the files h and house do not meet the criteria because they do not have the characters a through m as their second character.


Previous Topic/Section
Wildcard Characters
Previous Page
Pages in Current Topic/Section
1
Next Page
Match Negation
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005

Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.