上一页 1 ··· 211 212 213 214 215 216 217 218 219 ··· 367 下一页
摘要: 1、R语言中cumsum函数用于求累积和 > a <- 1:5 > a [1] 1 2 3 4 5 > cumsum(a) ## 求累积和 [1] 1 3 6 10 15 阅读全文
posted @ 2022-04-02 15:16 小鲨鱼2018 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos7pc1 test2]# cat test.txt 1 x c 2 s d 3 e t 4 d s 5 j u 6 n x 2、程序 [root@centos7pc1 test2]# cat swap.sh #!/bin/bash temp1=$(sed -n 阅读全文
posted @ 2022-04-02 14:31 小鲨鱼2018 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 1、直接测试 [root@centos7pc1 test3]# ls test.sh [root@centos7pc1 test3]# cat test.sh ## 测试脚本 #!/bin/bash NUM=3 while [ $NUM -gt 0 ] ## 循环条件 do echo "xxxxx" 阅读全文
posted @ 2022-04-02 13:03 小鲨鱼2018 阅读(243) 评论(0) 推荐(0) 编辑
摘要: $RANDOM 是linux中的内置变量,可以随机生成 0~32767之间的整数数字。 1、取0~9的随机数 [root@centos7pc1 test3]# ls [root@centos7pc1 test3]# expr $RANDOM % 10 7 [root@centos7pc1 test3 阅读全文
posted @ 2022-04-02 12:16 小鲨鱼2018 阅读(554) 评论(0) 推荐(0) 编辑
摘要: 1、expr命令实现在命令行中的四则运算 [root@centos7pc1 test3]# ls [root@centos7pc1 test3]# expr 10 + 5 ## 数字和运算符的两侧必须有空格 15 [root@centos7pc1 test3]# expr 10+5 10+5 [ro 阅读全文
posted @ 2022-04-02 11:57 小鲨鱼2018 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos7pc1 test3]# ls a.txt [root@centos7pc1 test3]# cat a.txt ddfg uujj mmkk xxuu zzdd mmuh zzvv ddee 2、sed实现 [root@centos7pc1 test3]# l 阅读全文
posted @ 2022-04-02 11:10 小鲨鱼2018 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1、直接测试 [root@centos7pc1 test3]# ls [root@centos7pc1 test3]# a=10 [root@centos7pc1 test3]# echo $a 10 [root@centos7pc1 test3]# b=a+5 ## 变量没有$则直接输出了变量名 阅读全文
posted @ 2022-04-02 10:10 小鲨鱼2018 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 [root@centos7pc1 test3]# ls a.txt [root@centos7pc1 test3]# cat a.txt GGTGCAATAT GGTGCAATAT GGTGCAATAT GGTGCAATAT 2、将连续的字符转换为中间具有空格的字符 [root@cen 阅读全文
posted @ 2022-04-02 09:18 小鲨鱼2018 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1、问题samtools安装报错:configure: WARNING: S3 support not enabled: requires SSL development files 2、解决方法: [root@centos7pc1 samtools-1.15]# yum install gcc g 阅读全文
posted @ 2022-04-02 08:31 小鲨鱼2018 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1、问题samtools安装报错:configure: WARNING: libcurl not enabled: library not found 2、解决方法 [root@centos7pc1 samtools-1.15]# yum install libcurl-devel -y 阅读全文
posted @ 2022-04-02 08:26 小鲨鱼2018 阅读(190) 评论(0) 推荐(0) 编辑
上一页 1 ··· 211 212 213 214 215 216 217 218 219 ··· 367 下一页