上一页 1 ··· 393 394 395 396 397 398 399 400 401 ··· 403 下一页
摘要: 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 阅读(1753) 评论(0) 推荐(1)
摘要: 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 阅读(1884) 评论(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 阅读(4352) 评论(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 阅读(992) 评论(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 阅读(17666) 评论(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 阅读(10527) 评论(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 阅读(10498) 评论(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 阅读(12826) 评论(0) 推荐(2)
摘要: 1、创建测试数据 [root@linuxprobe test]# seq 20 > a.txt [root@linuxprobe test]# ls a.txt [root@linuxprobe test]# head a.txt 1 2 3 4 5 6 7 8 9 10 2、提取奇数行 [root 阅读全文
posted @ 2020-10-02 09:50 小鲨鱼2018 阅读(3136) 评论(0) 推荐(0)
摘要: 1、创建测试数据 [root@linuxprobe test]# seq 30 > a.txt [root@linuxprobe test]# ls a.txt [root@linuxprobe test]# head a.txt 1 2 3 4 5 6 7 8 9 10 2、提取奇数行 [root 阅读全文
posted @ 2020-10-01 23:29 小鲨鱼2018 阅读(3325) 评论(0) 推荐(0)
上一页 1 ··· 393 394 395 396 397 398 399 400 401 ··· 403 下一页