A glimpse of my shell notes

Source: Internet
Author: User
My shell notes get a glimpse at the door-Linux general technology-Linux programming and kernel information. The following is a detailed description.

A glimpse of my shell notes


Today is the weekend. I feel good. continue with our study yesterday.
I have already shared the shell variables with you yesterday. today is the weekend, so it's easy to learn.
(1) Shell wildcard
Wildcard characters are widely used for pattern matching, such as file name matching, path name search, and string search. The following are commonly used.
1. the "*" symbol is used to match strings that appear zero or multiple times. for example, l * can match like, li, and l. In other words, it is a string that matches all Strings prefixed with the "*" symbol.
2. "?" The symbol matches only one character at the corresponding position, for example, fil? File and filt can be matched, but filesystem cannot be matched, because? Only one character can be matched.
3. the [] symbol matches any character within the character group. The character groups in square brackets can be composed of directly given characters, or starting characters, ending characters, and a hyphen (-) that represents a limited range. For example, expression f [a-z] le can match related strings such as file, fale, and ftle.
When using square brackets, note that if the brackets contain the * and? Wildcard characters, which are considered to be common characters * and?
4. "!" The symbol is used with the [] symbol ,! Is used to match characters not listed in square brackets. For example, t [! A-z] st indicates that the matching character is not from a to z, so it can match tlst, t0st, and so on.
It's a weekend. have a good rest. Have a good weekend !!!
To be continued ······

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.