摘要:
001、 capitalize将字符串的首字符转换为大写, 其余全部转换为小写 >>> str1 = "aaBBccEEff" >>> str1 'aaBBccEEff' >>> str1.capitalize() ## 将字符串首字符转换为大写, 其余全部转换为小写 'Aabbcceeff' 00 阅读全文
posted @ 2022-08-17 21:35
小鲨鱼2018
阅读(790)
评论(0)
推荐(0)
摘要:
001、 (base) root@PC1:/home/test4# ls test.py (base) root@PC1:/home/test4# cat test.py ## 测试程序 #!/usr/bin/python rna = "AUGGCCAUGGCGCCCAGAACUGAGAUCAAUA 阅读全文
posted @ 2022-08-17 20:46
小鲨鱼2018
阅读(201)
评论(0)
推荐(0)
摘要:
001、列出当前工作目录 >>> import os >>> os.getcwd() ## 列出当前目录 '/home/test4' 002、修改工作目录 >>> os.chdir("/home/test3/") ## 修改当前的工作目录 >>> os.getcwd() '/home/test3' 阅读全文
posted @ 2022-08-17 18:44
小鲨鱼2018
阅读(68)
评论(0)
推荐(0)
摘要:
001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt ## 测试数据 ##1 ##2 ##3 4 i 6 y #kk mm a 9 7 6 (base) root@PC1:/home/tes 阅读全文
posted @ 2022-08-17 18:12
小鲨鱼2018
阅读(89)
评论(0)
推荐(0)
摘要:
001、n (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 (base) root@PC1:/home/test4# sed 'n;p' a.txt ## n的作用是将两行作 阅读全文
posted @ 2022-08-17 17:05
小鲨鱼2018
阅读(347)
评论(0)
推荐(0)
摘要:
001: p:输出缓冲区中的所有内容。 P:输出缓冲区中一个个换行符之前的内容 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 5 ## N的作用是预先读取下一行,将两行作为一行 阅读全文
posted @ 2022-08-17 16:53
小鲨鱼2018
阅读(850)
评论(0)
推荐(0)
摘要:
001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 34aaaa 5 6 7 aaaa 8 9 10 (base) root@PC1:/home/test4# sed '$ 阅读全文
posted @ 2022-08-17 16:25
小鲨鱼2018
阅读(395)
评论(0)
推荐(0)
摘要:
001、 (base) root@PC1:/home/test4# cat a.txt 1 2 3 4 34aaaa 5 6 7 aaaa 8 9 10 (base) root@PC1:/home/test4# sed -e:b -e '$!{N;1,1bb' -e\} -e '/\n.*aaa/! 阅读全文
posted @ 2022-08-17 16:20
小鲨鱼2018
阅读(900)
评论(0)
推荐(0)
摘要:
001、方法1 root@PC1:/home/test# ls a.fasta test.py root@PC1:/home/test# head -n 5 a.fasta ## 参考基因组文件 >NC_056054.1 Ovis aries strain OAR_USU_Benz2616 bree 阅读全文
posted @ 2022-08-17 07:56
小鲨鱼2018
阅读(237)
评论(0)
推荐(0)
摘要:
001、 (base) root@PC1:/home/test4# ls a.txt (base) root@PC1:/home/test4# cat a.txt e ds d g d E d G D f (base) root@PC1:/home/test4# sed 's/e/MMM/' a.t 阅读全文
posted @ 2022-08-17 06:12
小鲨鱼2018
阅读(2298)
评论(0)
推荐(0)