09 2024 档案

摘要:001、 [root@localhost test]# ls a.txt [root@localhost test]# cat a.txt ## 测试数据 aadd kk;gene=ABEK:ett 8735 fdfk jj;gene=IYNF:34DF UYG [root@localhost te 阅读全文
posted @ 2024-09-25 11:16 小鲨鱼2018 阅读(112) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试文本 abk akkkkccc 8777 ,,, aaaf 333444 uukk22 [root@PC1 test]# cat a.txt | tr -s [:alnum: 阅读全文
posted @ 2024-09-22 19:52 小鲨鱼2018 阅读(25) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 afdf eDET FDSS FFde fexk mxnd ## 此处应该是个2 [root@PC1 test]# cat a.txt | awk '{for(i = 阅读全文
posted @ 2024-09-22 19:40 小鲨鱼2018 阅读(17) 评论(0) 推荐(0) 编辑
摘要:001、大写转换为小写 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 ab cD EF HI KL mn Op qM [root@PC1 test]# sed 's/[A-Z]/\L&/g' a.txt ## 所有的大写转换 阅读全文
posted @ 2024-09-22 19:28 小鲨鱼2018 阅读(91) 评论(0) 推荐(0) 编辑
摘要:001、 >>> list1 ## 测试列表 ['chicken', 'duck', 'goose', 'iron', 'xxx'] >>> list1[:3] ## 前三个 ['chicken', 'duck', 'goose'] >>> list1[-3:] ## 后三个 ['goose', ' 阅读全文
posted @ 2024-09-22 15:11 小鲨鱼2018 阅读(10) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls test.c [root@PC1 test]# cat test.c #include <stdio.h> int main(void) { int i; puts("please input an integer."); printf("i = " 阅读全文
posted @ 2024-09-20 13:07 小鲨鱼2018 阅读(20) 评论(0) 推荐(0) 编辑
摘要:001、 [root@localhost test]# ls ## 两个测试c程序 test01.c test02.c [root@localhost test]# cat test01.c ## 后置递增运算符,表达式的值等于递增前的表达式的值 #include <stdio.h> int mai 阅读全文
posted @ 2024-09-20 08:47 小鲨鱼2018 阅读(17) 评论(0) 推荐(0) 编辑
摘要:001、 [sy20213040737@admin2 test]$ cat a.txt ## 测试数据 3 8 34 50 [sy20213040737@admin2 test]$ awk '{if(NR == 1){tmp = $1} else {print $1 - tmp; tmp = $1} 阅读全文
posted @ 2024-09-19 10:49 小鲨鱼2018 阅读(25) 评论(0) 推荐(0) 编辑
摘要:001、 [root@localhost test]# ls test.c [root@localhost test]# cat test.c #include <stdio.h> int main(void) { int i; printf("i = "); scanf("%d", &i); if 阅读全文
posted @ 2024-09-19 08:36 小鲨鱼2018 阅读(29) 评论(0) 推荐(0) 编辑
摘要:Linux 中 awk命令如何截取指定字段的前几个字符。 01、 [root@localhost test]# ls a.txt [root@localhost test]# cat a.txt ## 测试数据 34 kjhge 31 dsbed 23 kmfeq 35 ewkmn [root@lo 阅读全文
posted @ 2024-09-07 19:16 小鲨鱼2018 阅读(137) 评论(0) 推荐(0) 编辑
摘要:001、 df <- data.frame(A = c(1, 2, 3), B = c(4, 5, 6), C = c(7, 8, 9)) row.names(df) <- c("mm", "qq", "dd") df cbind(com1 = rownames(df), df) ## 行号转换为第 阅读全文
posted @ 2024-09-04 10:08 小鲨鱼2018 阅读(244) 评论(0) 推荐(0) 编辑
摘要:001、 [root@localhost test]# ls test.c [root@localhost test]# cat test.c #include <stdio.h> int main(void) { int n1,n2; puts("please input two integers 阅读全文
posted @ 2024-09-04 09:27 小鲨鱼2018 阅读(11) 评论(0) 推荐(0) 编辑
摘要:001、相等运算符 == != 002、关系运算符 > >= < <= 003、条件运算符 a ? b:c [root@localhost test]# ls test.c [root@localhost test]# cat test.c #include <stdio.h> int main(v 阅读全文
posted @ 2024-09-04 09:12 小鲨鱼2018 阅读(9) 评论(0) 推荐(0) 编辑
摘要:001、c语言中条件运算符 [root@localhost test]# cat test.c ## 测试程序 #include <stdio.h> int main(void) { int n1, n2, max; puts("please input two integers"); printf 阅读全文
posted @ 2024-09-03 12:59 小鲨鱼2018 阅读(14) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt idx.txt [root@PC1 test]# cat a.txt 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 阅读全文
posted @ 2024-09-02 10:59 小鲨鱼2018 阅读(37) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据如下 a 8 a 3 b 2 e 2 d 10 b 3 b 7 e 4 [root@PC1 test]# awk '{ay[$1] += $2; ay2[$1]++} E 阅读全文
posted @ 2024-09-01 22:28 小鲨鱼2018 阅读(33) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示