Basic Regular Expressions and shell Regular Expressions for Linux shell Programming

Source: Internet
Author: User

Basic Regular Expressions and shell Regular Expressions for Linux shell Programming











Fast query of Linux commands and Shell programming examples

Covers common Linux commands, including Shell script programming syntax, text processing tools,
Knowledge about regular expressions and Linux System Management
Provides in-depth instructions and extensive usage skills.
Readers can browse by function or in alphabetical order.
Each Command is accompanied by a typical application example, allowing readers to master it in a short time.
Linux application skills: This book is recommended to introduce Linux commands and Shell programming. The content is divided into three units, a total of 330 commands. Unit 1st is about Linux and command operations. It mainly introduces basic Linux knowledge and command operation methods. Unit 2nd is about BASH and SHELL scripts, it mainly describes the working principle of Shell, the types of Shell, the general operations of Shell, and some BASH features. Unit 3rd is a Linux Command, which introduces the command for querying, setting, and operating hardware, this gives readers a basic idea of operating hardware commands. The appendix classifies the instructions in unit 3rd by source for readers to view.
This book is used to test common Linux-related environments, including the famous publishers RedHat, Fedora, Debian, Ubuntu, and gentoo. It also provides practical classification methods and relevance descriptions, it is easy for readers to learn. In addition, a detailed example will be provided for your reference. This will be an indispensable tool for Linux readers.
Covers common Linux commands, including Shell script programming syntax, text processing tools,
Knowledge about regular expressions and Linux System Management
Provides in-depth instructions and extensive usage skills.
Readers can browse by function or in alphabetical order.
Each Command is accompanied by a typical application example, allowing readers to master it in a short time.
Linux application skills: This book is recommended to introduce Linux commands and Shell programming. The content is divided into three units, a total of 330 commands. Unit 1st is about Linux and command operations. It mainly introduces basic Linux knowledge and command operation methods. Unit 2nd is about BASH and SHELL scripts, it mainly describes the working principle of Shell, the types of Shell, the general operations of Shell, and some BASH features. Unit 3rd is a Linux Command, which introduces the command for querying, setting, and operating hardware, this gives readers a basic idea of operating hardware commands. The appendix classifies the instructions in unit 3rd by source for readers to view.
This book is used to test common Linux-related environments, including the famous publishers RedHat, Fedora, Debian, Ubuntu, and gentoo. It also provides practical classification methods and relevance descriptions, it is easy for readers to learn. In addition, a detailed example will be provided for your reference. This will be an indispensable tool for Linux readers.
A very good book, a very good book, a very good book A very good book, a very good book, a very good book A very good book, a very good book, a very good book A very good book, a very good book, a very good book A very good book, a very good book, a very good book A very good book, a very good book, a very good book A very good book, a very good book, a very good book .... .. remaining full text>

How does a Linux Shell regular expression match a 13-digit number?

Grep '^ [0-9] \ {1, 3 \} $ 'test.txt | grep' ^ [1-9]'

If it is a variable

Echo $ var | grep '^ [0-9] \ {1, 3 \} $' | grep '^ [1-9]'

$ Indicates the end of a row

This regular expression does not match strings like 12a.

What is your variable content?

Content of test.txt used for testing:
123
321
123212
001
010
100
10000
0011
10101
1101
1
2
3
11
22
33
1a
2a

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.