上一页 1 ··· 157 158 159 160 161 162 163 164 165 ··· 408 下一页
摘要: 001、 >>> import os >>> os.listdir("/home/test") ## 结果返回的是列表 ['a.txt', 'b.txt', 'test1', 'test2', 'test3'] >>> 阅读全文
posted @ 2022-11-04 12:12 小鲨鱼2018 阅读(134) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test]# ls a.txt test.py [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 阅读全文
posted @ 2022-11-04 12:07 小鲨鱼2018 阅读(196) 评论(0) 推荐(0)
摘要: 001\ [root@pc1 test3]# cat a.fa >chr1 cccccggggggggttttgg cccgggggg >chr2 uuuuutttttNNNNNddffff dddgggggggggggcccccccccc [root@pc1 test3]# cat test.py 阅读全文
posted @ 2022-11-04 10:05 小鲨鱼2018 阅读(77) 评论(0) 推荐(0)
摘要: 001、 [root@pc1 test3]# ls a.txt b.txt test.py [root@pc1 test3]# cat a.txt 1 2 3 [root@pc1 test3]# cat b.txt 1 2 3 [root@pc1 test3]# cat test.py ## 测试程 阅读全文
posted @ 2022-11-03 15:57 小鲨鱼2018 阅读(46) 评论(0) 推荐(0)
摘要: 001、 [root@pc1 test3]# python2 ## python2 Python 2.7.5 (default, Jun 28 2022, 15:30:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2 Type "help", 阅读全文
posted @ 2022-11-03 15:51 小鲨鱼2018 阅读(109) 评论(0) 推荐(0)
摘要: 001、 >>> str1 = ">aabbcc" >>> if str1.startswith(">"): ... print("yes") ... yes >>> if not str1.startswith(">"): ## python中if语句取反 ... print("yes") ... 阅读全文
posted @ 2022-11-02 16:24 小鲨鱼2018 阅读(626) 评论(0) 推荐(0)
摘要: 001、提取文件的最后几列 [root@pc1 test3]# ls a.txt [root@pc1 test3]# cat a.txt ## 测试文件 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 0 阅读全文
posted @ 2022-11-02 12:02 小鲨鱼2018 阅读(534) 评论(0) 推荐(1)
摘要: 001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 02 阅读全文
posted @ 2022-11-02 11:21 小鲨鱼2018 阅读(165) 评论(0) 推荐(0)
摘要: -b:以字节为单位进行截取。 -c:以字符为单位进行截取。 001、 [root@PC1 test1]# ls a.txt b.txt [root@PC1 test1]# cat a.txt ewr23436546cfgfd [root@PC1 test1]# cut -b 2 a.txt w [r 阅读全文
posted @ 2022-11-02 10:52 小鲨鱼2018 阅读(787) 评论(0) 推荐(0)
摘要: 001、跳转到指定列 n + | (管道) 或者 0nl(小写的L) 002、跳转到行首、行尾 0:行首 $:行尾 home:行首 end:行尾 003、左右移动 nl(小写的L):向右移动n位 hl(小写的L):向左移动n位 阅读全文
posted @ 2022-11-02 10:45 小鲨鱼2018 阅读(547) 评论(0) 推荐(0)
上一页 1 ··· 157 158 159 160 161 162 163 164 165 ··· 408 下一页