上一页 1 ··· 121 122 123 124 125 126 127 128 129 ··· 403 下一页
摘要: a、 正则表达式的类型 使用正则表达式最大的问题在于有不止一种类型的正则表达式。Linux 中的不同应用程序可能会用不同类型的正则表达式。这其中包括编程语言(Java、Perl 和 Python)、Linux 实用工具(比如 sed 编辑器、gawk 程序和 grep 工具)以及主流应用(比如 My 阅读全文
posted @ 2023-05-11 09:14 小鲨鱼2018 阅读(111) 评论(0) 推荐(0)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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 下一页