In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Xiaobian to share with you the use of linux egrep command in the file to find the specified string, I hope you read this article after the harvest, let us discuss it together!
The egrep command looks for a specified string in a file.
egrep is similar to grep -E in terms of syntax and parameters, but differs from grep in the way it interprets strings.
The egrep command is an extended version of grep, improving many operations that traditional grep cannot or does not facilitate. For example:
Not supported by grep? With + these two modifiers, but egrep can.
Grep does not support a| b or (abc| xyz) such "or one" alignment, but egrep can.
Grep requires\{and\} when dealing with {n,m}, but egrep does not.
Syntax format: egrep [parameters] [file]
Common parameters:
Reference Example
Filter files that contain one or more characters of "a":
[root@linuxcool ~]# egrep 'a+' linuxcool.txt
Filter strings containing abc or 123 characters:
[root@linuxcool ~]# egrep 'abc|123' linuxcool.txt
Filter characters that contain abc as a whole:
[root@linuxcool ~]# egrep '(abc)' linuxcool.txt
Filter one or more characters containing abc as a whole:
[root@linuxcool ~]# egrep '(abc)+' linuxcool.txt After reading this article, I believe you have a certain understanding of using the linux egrep command to find the specified string in the file. If you want to know more, welcome to pay attention to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.