上一页 1 ··· 357 358 359 360 361 362 363 364 365 ··· 367 下一页
摘要: 1、*比较常用的通配符,表示匹配任意长度的任意字符 创建测试数据: [root@linuxprobe test]# touch {1..3}.txt {1..3}.csv {1..3}.xxx ## 利用touch常见空文件 [root@linuxprobe test]# ls 1.csv 1.tx 阅读全文
posted @ 2020-10-05 11:13 小鲨鱼2018 阅读(4222) 评论(0) 推荐(0) 编辑
摘要: 1、创建测试数据 > test <- c(1,2,3,1,1,2,5) ##创建向量测试数据> test[1] 1 2 3 1 1 2 5> duplicated(test) ## 基本用法,返回逻辑值,非重复为F,重复为T[1] FALSE FALSE FALSE TRUE TRUE TRUE F 阅读全文
posted @ 2020-10-04 23:45 小鲨鱼2018 阅读(26443) 评论(0) 推荐(0) 编辑
摘要: 1、标准输入重定向0,通常省略;标准输出重定向1,通常省略;标准错误输出重定向2,不能省略 创建测试数据 [root@linuxprobe test]# echo 'this is a test!' > a.txt[root@linuxprobe test]# lsa.txt[root@linuxp 阅读全文
posted @ 2020-10-04 23:04 小鲨鱼2018 阅读(1658) 评论(0) 推荐(0) 编辑
摘要: 1、创建测试数据 [root@linuxprobe test]# cat a.txt e i j s e f s d g e d d 2、利用grep命令统计字符e出现的次数 [root@linuxprobe test]# grep -o "e" a.txt | wc -l 3 3、同时统计e和d出 阅读全文
posted @ 2020-10-03 18:15 小鲨鱼2018 阅读(1842) 评论(0) 推荐(0) 编辑
摘要: 1、使用vim编辑器创建测试数据 [root@linuxprobe test]# cat a.txt ewetrte fsdfgf dfghghj dsffgd hgfdwe 2、统计每一行f出现的次数 [root@linuxprobe test]# awk -F "f" '{print NF-1} 阅读全文
posted @ 2020-10-03 18:04 小鲨鱼2018 阅读(3999) 评论(0) 推荐(2) 编辑
摘要: 1、创建测试数据 [root@linuxprobe test]# dd if=/dev/zero bs=1024 count=40000 of=c.txt [root@linuxprobe test]# dd if=/dev/zero bs=1024 count=4000 of=d.txt [roo 阅读全文
posted @ 2020-10-03 17:53 小鲨鱼2018 阅读(932) 评论(0) 推荐(0) 编辑
摘要: 1、R语言strsplit用于分割字符串 创建测试数据 > test <- "aa bb cc dd ee ff" ##创建测试数据 > test [1] "aa bb cc dd ee ff" > class(test) ## 测试数据为字符 [1] "character" 2、按照指定分隔符拆分 阅读全文
posted @ 2020-10-03 16:48 小鲨鱼2018 阅读(17433) 评论(0) 推荐(0) 编辑
摘要: 1、使用vim创建测试数据 a.txt [root@linuxprobe test]# cat a.txt 1 w e t 2 s f h 3 z c g 4 e a g 5 a f w 6 k h d 7 w f r 2、删除指定的行 [root@linuxprobe test]# sed '3d 阅读全文
posted @ 2020-10-03 12:15 小鲨鱼2018 阅读(10375) 评论(0) 推荐(0) 编辑
摘要: 1、创建测试数据 > test <- as.data.frame(matrix(1:100,nrow = 10)) > test V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 1 1 11 21 31 41 51 61 71 81 91 2 2 12 22 32 42 52 62 7 阅读全文
posted @ 2020-10-03 11:37 小鲨鱼2018 阅读(10294) 评论(0) 推荐(0) 编辑
摘要: 1、创建测试数据 > dat <- as.data.frame(matrix(1:100,nrow =10)) > dat V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 1 1 11 21 31 41 51 61 71 81 91 2 2 12 22 32 42 52 62 72 8 阅读全文
posted @ 2020-10-02 15:19 小鲨鱼2018 阅读(12266) 评论(0) 推荐(2) 编辑
上一页 1 ··· 357 358 359 360 361 362 363 364 365 ··· 367 下一页