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.