随笔分类 - linux shell
摘要:001、 [root@PC1 test]# ls a.fa [root@PC1 test]# cat a.fa ## 测试fasta文件 >chr1 AACCCTTG TTCCCCC >chr2 CCCTTTTT CCCCCCCC TTTT >chr3 TTTTCCCC GGGG [root@PC1
阅读全文
摘要:001、bc实现自然对数运算 [root@pc1 ~]# echo "l(10)" | bc -l ## 实现自然对数运算 2.30258509299404568401 [root@pc1 ~]# echo "l(2.7328)" | bc -l ## 实现自然对数运算 1.005326724612
阅读全文
摘要:001、 [b20223040323@admin1 test]$ ls a.txt [b20223040323@admin1 test]$ cat a.txt 33 jj aa dd aa ff 88 rf ee aa ff 33 [b20223040323@admin1 test]$ sed -n
阅读全文
摘要:001、 [root@pc1 test]# ls data gene.txt [root@pc1 test]# cat gene.txt ## 文本 gene1 gene2 gene3 [root@pc1 test]# tree . ├── data └── gene.txt 1 directory
阅读全文
摘要:001、 [root@pc1 test]# ls [root@pc1 test]# touch test{1..5} [root@pc1 test]# ls test1 test2 test3 test4 test5 [root@pc1 test]# ls test* | xargs mv {} {
阅读全文
摘要:001、 [root@pc1 test]# for (( i = 1; i <= 5; i++)); do echo $i; done 1 2 3 4 5
阅读全文
摘要:linux中 | 可以匹配 | 两边的任意一项。 测试: [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt ## 测试数据 Octkkk 889 Oct1st 434 Oct2nd 442 Oct2nd 4kk Oct3nd 777 [root
阅读全文
摘要:() 将括号中的内容视为一个整体。 001、 测试: [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt ## 测试数据 123abc456 123abcabc456 123abcabcabc456 123abcabcabcabc456 [roo
阅读全文
摘要:001、{n}; 匹配之前的项 n 次; [0-9]{3}能够匹配任意的三位数,[0-9]{3}可以扩展为[0-9][0-9][0-9]。 测试: [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt ## 测试数据 ab123cdef 88 ab
阅读全文
摘要:001、?表示匹配0次或者1次 atcg?t 能够匹配 atct 或 atcgt,但是不能匹配 atcggt。 测试: [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt atct 888 atcggk 333 atcgt 444 atcgggk
阅读全文
摘要:[^] :匹配不在中括号内的任意一个字符。 中括号内可以是一个字符组或字符范围; 1[^01]能够匹配 12 和 13,但是不匹配 11 和 10;A[^0-9]匹配 A 以及随后除数字外的任意单个字符。 awk正则测试: [root@pc1 test]# ls a.txt [root@pc1 te
阅读全文
摘要:001、直接使用双引号输出 [root@pc1 test2]# echo "hello world!" ## 双引号输出感叹号报错 -bash: !": event not found 002、测试转义字符 [root@pc1 test2]# ls [root@pc1 test2]# echo "h
阅读全文
摘要:001、 [root@pc1 test]# a="abc" [root@pc1 test]# b="abcde" [root@pc1 test]# echo $a abc [root@pc1 test]# echo $b abcde [root@pc1 test]# echo ${#a} ## 输出
阅读全文
摘要:001、 [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt d iy 5f er sd 34 d8 3f dg dg xe j7 [root@pc1 test]# sed 's/\S\+/KKK/' a.txt ## 第一列 KKK iy 5f
阅读全文
摘要:001、 [root@PC1 network-scripts]# cat ifcfg-ens32 TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="static" DEFROUTE="yes" IPV4_FAILURE_
阅读全文
摘要:001、测试文件 [root@PC1 test2]# ls a.txt b.txt [root@PC1 test2]# cat a.txt ## 测试文件 a b k c j [root@PC1 test2]# cat b.txt ## 测试文件 a x b y c 002、输出两个文件合并后的唯一
阅读全文
摘要:001、pscp命令的目录,在安装putty的目录,如下图: 002、在pscp目录下打开cmd命令: 鼠标放置任意空白处,按住shift键,然后鼠标右击弹出对话框,选择在此处打开powershell选项。 弹出如下界面: 003、实现windows到linux中传输文件 pscp C:/Users
阅读全文
摘要:001、 [root@PC1 test]# ls test.txt [root@PC1 test]# cat test.txt ## 测试数据 Abpink Jnzoar Bizxar Abcd [root@PC1 test]# cat -A test.txt ## 第三行出现特殊字符B-BM- A
阅读全文
摘要:1、 [root@PC1 home]# echo "unalias rm mv cp" >> ~/.bashrc ## 在root家目录中.bashrc配置文件后追加取消别名命令 [root@PC1 home]# source ~/.bashrc ## 使配置文件生效
阅读全文
摘要:001、-O选项, 指定输出的文件名 [root@PC1 test]# wget -O download.file https://sra-downloadb.be-md.ncbi.nlm.nih.gov/sos5/sra-pub-zq-11/SRR001/770/SRR1770413/SRR177
阅读全文

浙公网安备 33010602011771号