会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
32
33
34
35
36
37
38
39
40
···
403
下一页
2024年9月25日
Linux 中awk命令同时指定多个分割符
摘要: 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
阅读(215)
评论(0)
推荐(0)
2024年9月22日
Linux中删除文本中所有的重复的字符保持唯一
摘要: 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
阅读(37)
评论(0)
推荐(0)
Linux 中实现文本中所有的单词的第一个字符大写,其余字符小写
摘要: 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
阅读(39)
评论(0)
推荐(0)
Linux 中sed命令实现大小写的转换
摘要: 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
阅读(142)
评论(0)
推荐(0)
python中列表切片
摘要: 001、 >>> list1 ## 测试列表 ['chicken', 'duck', 'goose', 'iron', 'xxx'] >>> list1[:3] ## 前三个 ['chicken', 'duck', 'goose'] >>> list1[-3:] ## 后三个 ['goose', '
阅读全文
posted @ 2024-09-22 15:11 小鲨鱼2018
阅读(17)
评论(0)
推荐(0)
2024年9月20日
c语言中什么都不执行的表达式语句
摘要: 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
阅读(38)
评论(0)
推荐(0)
c语言中后置递增运算符和前置递增运算符的区别
摘要: 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
阅读(46)
评论(0)
推荐(0)
2024年9月19日
Linux awk中输出上下两列值之间的差值
摘要: 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
阅读(58)
评论(0)
推荐(0)
test.c:12:17: error: break statement not within loop or switch
摘要: 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
阅读(56)
评论(0)
推荐(0)
2024年9月7日
Linux 中 awk命令如何截取指定字段的前几个字符
摘要: 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
阅读(261)
评论(0)
推荐(0)
上一页
1
···
32
33
34
35
36
37
38
39
40
···
403
下一页
公告