随笔分类 - linux shell
摘要:EPEL (Extra Packages for Enterprise Linux) 是一个由 Fedora 社区志愿者维护的软件包仓库,为 Red Hat Enterprise Linux (RHEL)、CentOS 和 Scientific Linux 等企业级Linux发行版提供额外的软件包。
阅读全文
摘要:001、查看防火墙状态 [root@PC1 test05]# systemctl status firewalld.service 002、关闭防火墙 [root@PC1 test05]# systemctl stop firewalld.service ## 关闭防火墙 [root@PC1 tes
阅读全文
摘要:001、 [root@PC1 test2]# cat record.sh #!/bin/bash while : do du -sh ./ sleep 2 ## 每隔2秒输出指定目录的大小 done
阅读全文
摘要:001、当变量为空时,为变量赋值 [root@PC1 test2]# var bash: var: command not found... [root@PC1 test2]# echo $var [root@PC1 test2]# var=${var:-123456} ## 变量为空时,将变量的值
阅读全文
摘要:001、关闭、开启回显功能 [root@PC1 test2]# seq 3 1 2 3 [root@PC1 test2]# stty -echo ## 关闭回显功能,关闭后在终端输入内容将不再显示 [root@PC1 test2]# 1 2 3, [root@PC1 test2]# [root@PC
阅读全文
摘要:001、 [root@PC1 test04]# ls a.txt test.py [root@PC1 test04]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
阅读全文
摘要:001、 [root@PC1 test03]# a=100 [root@PC1 test03]# echo $a 100 [root@PC1 test03]# echo $a+500 100+500 [root@PC1 test03]# echo $[a+500] ## 中括号可以实现变量运算 60
阅读全文
摘要:001、 [root@PC1 test03]# ls a.txt [root@PC1 test03]# cat a.txt ## 测试数据 bookbookbookbook jjjj name=jack uuuuuuu 127.0.0.1 bookbook77 xxxxx.com eeebookbo
阅读全文
摘要:001、删除文件的第一列 [root@PC1 test03]# ls a.txt [root@PC1 test03]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 [root@PC1 te
阅读全文
摘要:r选项的作用表示在文件中匹配B, 然后读入a.txt的内容, 添加到B的后面 001、 (base) [root@PC1 test2]# ls a.txt b.txt (base) [root@PC1 test2]# cat a.txt 1 2 3 4 5 (base) [root@PC1 test
阅读全文
摘要:001、 [root@PC1 test04]# ls a.txt [root@PC1 test04]# cat a.txt ## 测试数据 3333 gene 9999 kkkk gene 7777 8888 gene gene 0000 6666 ## 输出匹配字符及其下一行 [root@PC1
阅读全文
摘要:001、 [root@PC1 test04]# ls a.txt [root@PC1 test04]# cat a.txt ## 测试数据 3333 gene 9999 kkkk gene 7777 8888 gene 0000 6666 [root@PC1 test04]# sed -n '/ge
阅读全文
摘要:001、 [root@PC1 test04]# ls a.txt [root@PC1 test04]# cat a.txt ## 测试数据 3333 gene 9999 kkkk gene 7777 8888 gene 0000 6666 [root@PC1 test04]# awk '$1 ==
阅读全文
摘要:001、 [b20223040323@admin2 test]$ ls a.gff [b20223040323@admin2 test]$ cat a.gff region 1 pseudogene 2 transcript 3 exon 4 pseudogene 5 transcript 6 ex
阅读全文
摘要:001、 [root@PC1 test03]# ls a.fa [root@PC1 test03]# cat a.fa ## 测试序列 ATCGATGC [root@PC1 test03]# cat a.fa | tr "ATCG" "TAGC" ## 提取碱基序列的互补序列 TAGCTACG
阅读全文
摘要:001、 [root@PC1 test3]# ls a.txt [root@PC1 test3]# cat a.txt ## 测试数据 334 gene kkk yyy gene gene kkk gene gene mmmm [root@PC1 test3]# awk 'BEGIN{a="no"}
阅读全文
摘要:001、 [root@PC1 test3]# ls a.txt [root@PC1 test3]# cat a.txt ## 测试数据 3 5 44 agf gene 45 87 gene dfg iu gene 887 777 [root@PC1 test3]# sed '1,/gene/{/ge
阅读全文
摘要:001、 [root@PC1 test3]# ls a.txt b.txt [root@PC1 test3]# cat a.txt ## 测试数据 3 a 5 b b 4 7 [root@PC1 test3]# cat b.txt ## 测试数据 3 a 5 b 4 7 [root@PC1 test
阅读全文
摘要:001、 [root@PC1 test3]# ls file1.txt file2.txt [root@PC1 test3]# cat file1.txt 1 John 2 Mary 3 Tom [root@PC1 test3]# cat file2.txt 1 M 2 F 4 M [root@PC
阅读全文
摘要:001、输出匹配字符之后的若干行 a、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 01 02 kk 03 04 05 06 07 kk 08 09 10 11 12 ## 输出匹配字符之后的3行 [root@PC1
阅读全文

浙公网安备 33010602011771号