随笔分类 -  linux shell

上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 77 下一页
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt ## 测试数据 ##1 ##2 ##3 4 i 6 y #kk mm a 9 7 6 (base) root@PC1:/home/tes 阅读全文
posted @ 2022-08-17 18:12 小鲨鱼2018 阅读(88) 评论(0) 推荐(0)
摘要:001、n (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 (base) root@PC1:/home/test4# sed 'n;p' a.txt ## n的作用是将两行作 阅读全文
posted @ 2022-08-17 17:05 小鲨鱼2018 阅读(347) 评论(0) 推荐(0)
摘要:001: p:输出缓冲区中的所有内容。 P:输出缓冲区中一个个换行符之前的内容 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 ## N的作用是预先读取下一行,将两行作为一行 阅读全文
posted @ 2022-08-17 16:53 小鲨鱼2018 阅读(849) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 34aaaa 5 6 7 aaaa 8 9 10 (base) root@PC1:/home/test4# sed '$ 阅读全文
posted @ 2022-08-17 16:25 小鲨鱼2018 阅读(395) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 34aaaa 5 6 7 aaaa 8 9 10 (base) root@PC1:/home/test4# sed -e:b -e '$!{N;1,1bb' -e\} -e '/\n.*aaa/! 阅读全文
posted @ 2022-08-17 16:20 小鲨鱼2018 阅读(900) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt e ds d g d E d G D f (base) root@PC1:/home/test4# sed 's/e/MMM/' a.t 阅读全文
posted @ 2022-08-17 06:12 小鲨鱼2018 阅读(2296) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 (base) root@PC1:/home/test2# sed 'n; 阅读全文
posted @ 2022-08-17 01:24 小鲨鱼2018 阅读(211) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt 1 2 3 4 5 6 7 8 9 10 (base) root@PC1:/home/test2# cat a.txt | sed 'N 阅读全文
posted @ 2022-08-17 01:21 小鲨鱼2018 阅读(808) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt ## 测试数据 This is 1 This is 2 This is 3 This is 4 This is 5 (base) roo 阅读全文
posted @ 2022-08-17 01:18 小鲨鱼2018 阅读(311) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 01 02 AAA 03 04 05 BBB 06 07 08 CCC 09 10 (base) root@PC1:/h 阅读全文
posted @ 2022-08-17 01:07 小鲨鱼2018 阅读(550) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/k/{n;d}' a.txt ## 删除匹配k之后的一行 1 2 3 k 5 阅读全文
posted @ 2022-08-17 00:57 小鲨鱼2018 阅读(75) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/k/, +2{/k/b; d}' a.txt ## 删除匹配k之后的两行 1 阅读全文
posted @ 2022-08-17 00:54 小鲨鱼2018 阅读(624) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 1 2 3 k 4 5 6 7 k 8 9 10 (base) root@PC1:/home/test2# sed '/ 阅读全文
posted @ 2022-08-17 00:42 小鲨鱼2018 阅读(59) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# cat a.txt ## 测试数据 e f k s g d a c m s e g (base) root@PC1:/home/test2# sed 's/m/Q/g' a.txt ## 将m替换为Q e f k s g d a c 阅读全文
posted @ 2022-08-16 21:23 小鲨鱼2018 阅读(413) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test/test# ls a.txt root@PC1:/home/test/test# cat a.txt ## 测试数据 a b c d b d k 8 m 9 k d 0 r k b f f b 8 b 9 k d root@PC1:/home/tes 阅读全文
posted @ 2022-08-16 18:09 小鲨鱼2018 阅读(50) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test/test# ls a.txt root@PC1:/home/test/test# cat a.txt ## 测试数据 a b c d 3 8 6 9 0 r k 3 root@PC1:/home/test/test# awk '{for(i = 1; 阅读全文
posted @ 2022-08-16 17:56 小鲨鱼2018 阅读(275) 评论(0) 推荐(0)
摘要:001、问题 (base) root@PC1:/home/test2# curl -O ftp://ftp.arabidopsis.org/home/tair/Genes/TAIR10_genome_release/TAIR10_gff3/TAIR10_GFF3_genes.gff curl: er 阅读全文
posted @ 2022-08-13 17:53 小鲨鱼2018 阅读(3779) 评论(0) 推荐(0)
摘要:001\ #include <stdio.h> int main(void) { int i, j, max; puts("please input two integers"); printf("i = "); scanf("%d", &i); printf("j = "); scanf("%d" 阅读全文
posted @ 2022-08-11 23:30 小鲨鱼2018 阅读(747) 评论(0) 推荐(0)
摘要:001、 (base) root@PC1:/home/test2# ls collective.txt (base) root@PC1:/home/test2# cat collective.txt ## 测试文件, 删除每个字符中/前的所有内容 test1/1.txt test1/2.txt te 阅读全文
posted @ 2022-08-11 16:16 小鲨鱼2018 阅读(972) 评论(0) 推荐(0)
摘要:001、方式1 (base) root@PC1:/home/test2# ls test1 test2 test3 (base) root@PC1:/home/test2# tree . ├── test1 │ ├── 1.txt │ ├── 2.txt │ └── 3.txt ├── test2 阅读全文
posted @ 2022-08-11 15:59 小鲨鱼2018 阅读(5509) 评论(0) 推荐(0)

上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 77 下一页