会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
121
122
123
124
125
126
127
128
129
···
403
下一页
2023年5月11日
linux 中 正则表达式* 和 ?
摘要: a、 正则表达式的类型 使用正则表达式最大的问题在于有不止一种类型的正则表达式。Linux 中的不同应用程序可能会用不同类型的正则表达式。这其中包括编程语言(Java、Perl 和 Python)、Linux 实用工具(比如 sed 编辑器、gawk 程序和 grep 工具)以及主流应用(比如 My
阅读全文
posted @ 2023-05-11 09:14 小鲨鱼2018
阅读(111)
评论(0)
推荐(0)
2023年5月10日
linux 中sed命令实现大小写的转换
摘要: 001、大写转换为小写 root@DESKTOP-IDT9S0E:/home/test# ls a.txt root@DESKTOP-IDT9S0E:/home/test# cat a.txt ## 测试数据 AWF hhdd meh DGEE 345 efff rrt hhkk root@DESK
阅读全文
posted @ 2023-05-10 22:18 小鲨鱼2018
阅读(334)
评论(0)
推荐(0)
python 中读入文件跳过文件的前几行
摘要: 001、 [root@PC1 test]# ls a.txt test.py [root@PC1 test]# cat a.txt ## 测试文件 1 abcd 2 abcd 3 abcd 4 abcd [root@PC1 test]# cat test.py ## 测试程序 in_file = o
阅读全文
posted @ 2023-05-10 09:20 小鲨鱼2018
阅读(350)
评论(0)
推荐(0)
2023年5月9日
python中以空格将字符串拆分为两部分
摘要: 001、 >>> import re >>> tmp = re.match(r'^([^\s]+)\s(.*)', "ab cd") >>> tmp <re.Match object; span=(0, 5), match='ab cd'> >>> tmp.group(1) 'ab' >>> tmp
阅读全文
posted @ 2023-05-09 22:57 小鲨鱼2018
阅读(105)
评论(0)
推荐(0)
python 中 re.match、re.search 和 re.split的用法
摘要: 001、re.match >>> re.match("ab", "abcdefgab") ## 在字符串abcdefgab中查找字符串ab, 返回索引 <re.Match object; span=(0, 2), match='ab'> >>> re.match("xy", "abcdefgab")
阅读全文
posted @ 2023-05-09 20:48 小鲨鱼2018
阅读(404)
评论(0)
推荐(0)
centos中 hisat2 软件的安装
摘要: 001、 下载安装包 [root@PC1 hisat2]# wget https://github.com/DaehwanKimLab/hisat2/archive/refs/tags/v2.2.1.tar.gz 002、 tar -xavf v2.2.1.tar.gz ## 解压 cd hisat
阅读全文
posted @ 2023-05-09 18:01 小鲨鱼2018
阅读(291)
评论(0)
推荐(0)
2023年5月8日
linux 中xargs -i 和-I在使用上的区别
摘要: 001、 -i [root@PC1 test]# ls [root@PC1 test]# touch a.txt a.csv [root@PC1 test]# ls a.csv a.txt [root@PC1 test]# find ./ -name "*.txt" | xargs -i cp {}
阅读全文
posted @ 2023-05-08 21:56 小鲨鱼2018
阅读(254)
评论(0)
推荐(0)
linux 中 xargs 中的 -i选项
摘要: 001、不使用 -i选项 [root@PC1 test]# ls abva abvb abvc abvd dir1 dir2 dir3 dir4 dir5 [root@PC1 test]# ls | xargs mv {} {}.bak ## 不使用 -i选项 mv: cannot stat ‘{}
阅读全文
posted @ 2023-05-08 11:37 小鲨鱼2018
阅读(1551)
评论(4)
推荐(0)
2023年5月7日
正则表达式?表示匹配前一个字符0次或者1次
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt 33 ac kk dd adebc kk ad abc uy dd gg 88 [root@PC1 test]# grep -E "ab?c" a.txt ## "ab?c" 等价与
阅读全文
posted @ 2023-05-07 20:52 小鲨鱼2018
阅读(453)
评论(0)
推荐(0)
linux 中查看各个子目录占用磁盘的大小
摘要: 001、 [root@PC1 test]# ls dir1 dir2 dir3 [root@PC1 test]# du -h ## 查看所有子目录占用磁盘的大小 100M ./dir1 300M ./dir2 30M ./dir3 430M .
阅读全文
posted @ 2023-05-07 20:30 小鲨鱼2018
阅读(330)
评论(0)
推荐(0)
上一页
1
···
121
122
123
124
125
126
127
128
129
···
403
下一页
公告