Notes on metacharacters of Shell statements in Linux

Source: Internet
Author: User
Article Title: Shell statement metacharacters in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Linux Shell metacharacters:

^ The first line locator/^ love/matches the line starting with love

$ Line tail locator/love $/match the line ending with love

. Match a single character/l ...... E/match the rows that contain one l, two characters, and one e.

* Match 0 or multiple characters before */* love/match zero or multiple spaces followed by love rows

[] Match any one of the characters/[Ll] ove/match the line of Love or love

[X-y] matches any character in the specified range

[^] Match any character not in the specified character group [^ A-Z] match any character not in the A-Z

\ Is used to convert metacharacters/love \./to match the line with a period of love

\ <Head of a word locator/\> end of a word Locator

X \ {m \} characters x repeated m times

The characters x \ {m, \} must be repeated for at least m times.

The characters x \ {m, n \} repeat m to n times.

Related Article

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.