In Linux, the wildcard example BashShell does not support regular expressions. the regular expressions are Shell commands and tools, such as grep, sed, and awk. However, bashShell can use some metacharacters in the regular expression to implement the Globbing function... the Bash Shell in Linux does not support regular expressions. the regular expressions are Shell commands and tools, such as grep, sed, and awk. However, bash Shell can use some metacharacters in regular expressions to implement the Globbing function, wildcard configuration refers to the process of extending a batch of specific file names that contain wildcards to be stored on a computer, server, or network. The most common wildcard characters in www.2cto.com include :?, *, [], {}, ^, And so on. The meanings of these metacharacters in the wildcard are not exactly the same as those in the regular expression. * The symbol no longer represents the repetition of the previous character, but represents any character ,? The character represents any character. the ^ symbol in the wildcard does not represent the beginning of the line, but represents the inverse. The following uses the ls command to use wildcard characters: # List. detailed information of the ending awk file www.2cto.com ls-l *. awk # starts with 0, followed by 1 characters, and starts. files suffixed with pem, ls-l 0 ?. Pem # List ~ Starts with a letter in the range of h. ls-l [a-h] *. the meaning of the awk # [] symbol is the same as that of the [] symbol in the regular expression # The {} symbol in the wildcard represents a set of expressions, the expression in the {} symbol is "or". The link ls-l {[a-h] *. awk, 0 ?. Pem} # No space is allowed between expressions. A hacker input a file name containing a wildcard to intentionally allow repeated and continuous configuration by the server, which may cause DoS attacks. Therefore, large servers often improve server security by limiting the number of times the server performs the wildcard function, limiting the number of wildcard characters that a specific user enters each time, or rejecting wildcard characters that are too common. The internal variable GLOBIGNORE stores the collection of file names ignored during configuration. it should be said ,?, *, [], {}, ^ And GLOBIGNORE variables constitute all the contents of Shell wildcard.
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