当前位置:网站首页>Regular expression exercise
Regular expression exercise
2022-07-27 21:52:00 【51CTO】
1、 Show /proc/meminfo The size of the file s Beginning line ( requirement , Use two methods )

2、 Show /etc/passwd Not in the document /bin/bash The line at the end

3、 Show users root default shell Program

4、 find /etc/passwd Two or three digits in

5、 Show /etc/grub2.cfg In file , A line that begins with at least one white space character and is followed by a non white space character

6、 find netstat -tan In the command result listen A line that ends with any number of white space characters

7、 Add users bash、tesbash、basher、sh、nologin(shell by /sbin/nologin), find shell Row with the same name as the user

8、 utilize df and grep, Take out the utilization of each partition of the disk , And sort

9、 Show three users root、lgw、admin Of uid And default shell( Extended regularization )

10、 find /etc/rc.d/init.d/functions The first line in the file is a word ( Include underline ) The line followed by a parenthesis


11、 Use egrep Take out /etc/rc.d/init.d/functions Middle base name

11、 Use egrep Take out /etc/rc.d/init.d/functions Directory name in

12、 Statistics last In the order root Every host that logs in ip Address login times

13、 Use regular expressions to express 0-9、10-99、100-99、200-249、250-255;





14、 Show ifconfig All in the command result ipv4 Address

15、 Put this string welcome to lgw company Each character in is de duplicated and sorted , The one with the most repetitions is at the top .

边栏推荐
- Dual process theory and triple mental model
- 零钱通项目(两个版本)含思路详解
- How to realize a good knowledge management system?
- Basic usage of two-dimensional array
- 软件测试面试题:软件验收测试包括正式验收测试、alpha测试、beta测试三种测试?
- V2.x synchronization is abnormal. There are a lot of posts that cannot be synchronized in the cloud, and the synchronization is blocked and slow
- C language - Introduction - grammar - pointer (12)
- 枚举和注解
- In crsctl, the function of displayed home
- 怎么还有人问 MySQL 是如何归档数据的呢?
猜你喜欢

It seems to be a bug of thread pool, but I think the source code design is unreasonable.

Form of objects in memory & memory allocation mechanism
![[2022 Niuke multi School Game 2] k-link with bracket sequence I](/img/95/9d6710bfb7b9282b4a06a5f61a1f08.png)
[2022 Niuke multi School Game 2] k-link with bracket sequence I

How to realize a good knowledge management system?

Technical practice behind bloom model: how to refine 176billion parameter model?

零钱通项目(两个版本)含思路详解

Zibbix installation and deployment

Box model and element positioning

枚举Enum的简单使用

LInkedList底层源码
随机推荐
Software testing interview question: what aspects should be considered when designing test cases, that is, which aspects should different test cases be tested for?
深入理解递归的方法调用(含实例迷宫问题、汉诺塔、猴子吃桃、斐波拉契、阶乘))
看起来是线程池的BUG,但是我认为是源码设计不合理。
Recursion / backtracking (Part 1)
8000 word explanation of OBSA principle and application practice
Under the epidemic, the mobile phone supply chain and offline channels are blocked! Sales plummeted and inventory was serious!
面向3nm及以下工艺,ASML新一代EUV光刻机曝光
软件测试面试题:在windows下保存一个文本文件时会弹出保存对话框,如果为文件名建立测试用例,等价类应该怎样划分?
首发展锐5G芯片!纯国产5G手机海信F50曝光:搭载虎贲T710+春藤510
Software test interview question: does software acceptance test include formal acceptance test, alpha test and beta test?
Ora-27300, ora-27301, ora-27302, ora-27303, tns-2518, tns-12549, tns-12560, tns-00519 and other alarm processing
美司法部增加针对华为的指控,包括窃取商业秘密等16项新罪名
QT take out the input box string, lineedit
Box model and element positioning
关系型数据库的设计思想,20张图给你看的明明白白
一口气学完 Redis 集群方案
University of Tilburg, Federal University of the Netherlands | neural data to text generation based on small datasets: comparing the added value of two semi supervised learning approvals on top of a l
高并发遇到死锁了,如何搞?
day 1 - day 4
MySQL data recovery process is based on binlog redolog undo