上一页 1 ··· 147 148 149 150 151 152 153 154 155 ··· 403 下一页
摘要: 001、 [root@PC1 test]# ls [root@PC1 test]# touch a.txt ## 测试文件 [root@PC1 test]# seq 6 > b.txt ## 测试文件 [root@PC1 test]# cat a.txt [root@PC1 test]# cat b 阅读全文
posted @ 2022-12-08 22:35 小鲨鱼2018 阅读(1163) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 a bc k bc e bc bc bc 3 44 55 60 bc bc kk uu [root@PC1 test]# rev a.txt | sed 's/cb/Q 阅读全文
posted @ 2022-12-08 20:28 小鲨鱼2018 阅读(360) 评论(0) 推荐(0)
摘要: 001、 删除匹配字符之后的若干行 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 1 2 3 4 5 6 7 8 9 10 [root@PC1 test]# sed '/5/,+1{/5/b;d}' a.txt ## 删除匹 阅读全文
posted @ 2022-12-08 20:02 小鲨鱼2018 阅读(1856) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 1 2 3 4 5 6 7 8 [root@PC1 test]# sed '/4/{n;d}' a.txt ## 删除匹配4的下一行 1 2 3 4 6 7 8 002 阅读全文
posted @ 2022-12-08 12:52 小鲨鱼2018 阅读(186) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 1 2 3 4 5 6 [root@PC1 test]# awk '{printf("%s ", $0)} END {printf"\n"}' a.txt 1 2 3 阅读全文
posted @ 2022-12-08 12:21 小鲨鱼2018 阅读(667) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt d t d e k c z c e e f t [root@PC1 test]# sed 's/d/9/g' a.txt ## 将d替换为9 9 t 9 e k c z c e e f 阅读全文
posted @ 2022-12-08 11:59 小鲨鱼2018 阅读(1079) 评论(0) 推荐(0)
摘要: 001、 删除a.txt中每一列中=号后面的所有内容 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 AC=2 AF=1.00 AN=2 DP=131 AC=2 AF=1.00 AN=2 DP=152 AC=2 AF=1.00 阅读全文
posted @ 2022-12-08 00:32 小鲨鱼2018 阅读(932) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test]# start=`date +%s` ## 从 1970 年 1 月 1 日 00:00:00 UTC 到目前为止的秒数(时间戳) [root@PC1 test]# echo $start 1670412402 [root@PC1 test]# end=`da 阅读全文
posted @ 2022-12-07 19:29 小鲨鱼2018 阅读(669) 评论(0) 推荐(0)
摘要: 001、压缩保留源文件 [root@PC1 test]# ls a.txt [root@PC1 test]# gzip -c a.txt > a.txt.gz ## 压缩并保留源文件 [root@PC1 test]# ls a.txt a.txt.gz 002、解压缩保留源文件 [root@PC1 阅读全文
posted @ 2022-12-07 18:56 小鲨鱼2018 阅读(1781) 评论(0) 推荐(0)
摘要: 001、通过比较MD5码 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 1 2 5 3 4 6 7 [root@PC1 test]# sort -n a.txt | md5sum ## 排序并生成MD5码 77c58f04583c86f78 阅读全文
posted @ 2022-12-07 16:54 小鲨鱼2018 阅读(80) 评论(0) 推荐(0)
上一页 1 ··· 147 148 149 150 151 152 153 154 155 ··· 403 下一页