当前位置:网站首页>regular expression
regular expression
2022-07-27 06:29:00 【Small Shimmer】
Regular expressions grep





Use the basic regular expression to query the blank line in the file and the first line is “#” Outside the line ( It is usually used to view the effective configuration file ), perform “grep -v ‘^ $ ’ test.txt l grep -v ‘^#’ That is to say . You need to use the pipeline command to search twice . If you use extended regular expressions , It can be simplified as egrep -v ’ ^$’ test.txt







cut

cut Only good at dealing with text separated by a single character
sort

uniq

tr

tr -s ‘\n’ When multiple carriage returns are encountered, only one carriage return is reserved , Equivalent to removing empty lines
sed Tools





If you delete duplicate blank lines , That is to say, there is only one continuous blank line ,cat -s test .txt

expect




awk










边栏推荐
- Unity shader overview
- Advanced ROS communication mechanism
- Launch file of ROS operation management
- 5g network identity - detailed explanation of 5g Guti
- 数据库的联合查询
- Li Kou daily question (linked list simulation)
- 兼容性测试知识点
- 正确安装wireshark
- 5g's past and present life -- a brief introduction to the development of mobile communication
- Unityshader Gaussian blur
猜你喜欢

Interpretation of unity desktop version 7.6

PXE efficient batch network installation

源码编译安装LNMP和DISCUZ论坛

Non photorealistic rendering (NPR) paper understanding and reproduction (unity) - stylized highlights for cartoon rendering and animation

Seven sorting details

What is the difference between single line and three line when renting servers in Hong Kong?

jmeter简介

正则表达式

Introduction to hash table

wireshark IP地址域名解析
随机推荐
DNS域名解析服务
英语基础知识:定语使用规则下篇
接口测试概念及Postman工具简介使用
5g network identity - detailed explanation of 5g Guti
Related knowledge of multithreading
This is my blog
Remote sensing image recognition imaging synthesis
Tangent space and TBN matrix
Brief introduction to unity menu interface
Shell脚本编写格式
Unit integration (grounding) test
Using markdowm
多线程的相关知识
How to choose the correct server backup method
Programming learning record -- recursively solving the tower of Hanoi problem
Some descriptions and usage of database index
Path to file
Summary of Internet simple protocol
shell脚本之函数调用
Multi coordinate transformation