摘要:
001、 >>> str1 = "abcdabaewr" ## 测试字符串 >>> import re >>> len(re.findall("a", str1)) ## 统计a出现的次数 3 >>> len(re.findall("b", str1)) ## 统计b出现的次数 2 >>> len( 阅读全文
摘要:
001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
摘要:
001、 (base) root@PC1:/home/test2# ls a.fasta test.py (base) root@PC1:/home/test2# cat a.fasta ## 测试fasta文件 >gene1 myc AGCTGCCTAAGC GGCATAGCTAATCG >gen 阅读全文
摘要:
001、 (base) root@PC1:/home/test2# ls collective.txt (base) root@PC1:/home/test2# cat collective.txt ## 测试文件, 删除每个字符中/前的所有内容 test1/1.txt test1/2.txt te 阅读全文
摘要:
001、方式1 (base) root@PC1:/home/test2# ls test1 test2 test3 (base) root@PC1:/home/test2# tree . ├── test1 │ ├── 1.txt │ ├── 2.txt │ └── 3.txt ├── test2 阅读全文
摘要:
001、 (base) root@PC1:/home/test2# ls ## 当前目录下三个文件夹 test1 test2 test3 (base) root@PC1:/home/test2# tree ## 使用tree命令查看 . ├── test1 │ ├── 1.txt │ ├── 2.t 阅读全文
摘要:
001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 a b c e a d a d e a f j 3 j k r a d a a a a a a f f a e (bas 阅读全文
摘要:
printf命令用于格式化输出 001、输出字符串 %s (base) root@PC1:/home/test2# printf "%s\n" abcde ## %s 输出字符串 abcde (base) root@PC1:/home/test2# printf "xxx--%s\n" abcde 阅读全文
摘要:
cmp命令用于判断两个文件是否相同 001、 (base) root@PC1:/home/test2# ls (base) root@PC1:/home/test2# seq 5 > a.txt; seq 3 > b.txt; seq 5 > c.txt ## 3个测试文件 (base) root@ 阅读全文
摘要:
001、 [ -a FILE ] 如果 FILE 存在则为真。 [ -b FILE ] 如果 FILE 存在且是一个块特殊文件则为真。 [ -c FILE ] 如果 FILE 存在且是一个字特殊文件则为真。 [ -d FILE ] 如果 FILE 存在且是一个目录则为真。 [ -e FILE ] 如 阅读全文