随笔分类 - Linux之sed
摘要:1。操作文本 的内容。 cat sedtest.txt [root@ecs-76840553 sed]# cat sedtest.txt This is the header line. This is the first data line. This is the second data lin
阅读全文
摘要:1.sed &用法 1.1. sed & 用法 [root@ecs-76840553 sed]# cat 2 You are beautiful hello world hello alknlaknqlw hello hello hello world [root@ecs-76840553 sed]
阅读全文
摘要:练习(sed)1. 取出passwd文件中包含root的行? 2. 取出passwd文件中以root开头的行? 3. 取出passwd文件中以root或sshd的行? 4. 取出passwd文件中包含sync和mail的行? 5. 取出passwd文件中前三行? 6. 取出passwd文件中第一行和
阅读全文
摘要:1.sed打印文本第一行和最后一行 [root@ecs-76840553 sed]# cat chongfu.txt test 30 Hello 95 Linux 85 test 30 Hello 95 Linux 85 test 30 Hello 95 Linux 85 [root@ecs-768
阅读全文
摘要:1.sed简介 sed是Stream Editor(字符流编辑器)的缩写, 简称流编辑器。 sed是操作, 过滤和转换文本内容的强大工具 常用功能包括结合正则表达式对文件实现快速增删改查,其中查询的功能中最常用的两大功能是过滤(过滤指定字符串)、取行(取出指定行)。 2.sed执行流程 每次仅读取一
阅读全文

浙公网安备 33010602011771号