上一页 1 ··· 397 398 399 400 401 402 403 404 405 ··· 407 下一页
摘要: 1、创建测试数据 [root@linuxprobe test]# echo "aaa.bbb.ccc.ddd" > a.txt [root@linuxprobe test]# cat a.txt aaa.bbb.ccc.ddd 2、利用\进行转义,使转义字符仍为字符串 [root@linuxprob 阅读全文
posted @ 2020-10-05 13:32 小鲨鱼2018 阅读(17300) 评论(0) 推荐(0)
摘要: 1、简单用法,直接加数字 [root@linuxprobe test]# seq 10 ## 输出1到10列表 1 2 3 4 5 6 7 8 9 10 2、设置起点、终点 [root@linuxprobe test]# seq 5 10 ##设置起点为5,终点为10,默认的步长为1。 5 6 7 阅读全文
posted @ 2020-10-05 12:47 小鲨鱼2018 阅读(930) 评论(0) 推荐(0)
摘要: 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 阅读(4340) 评论(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 阅读(28631) 评论(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 阅读(1757) 评论(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 阅读(1911) 评论(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 阅读(4374) 评论(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 阅读(996) 评论(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 阅读(17691) 评论(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 阅读(10558) 评论(0) 推荐(0)
上一页 1 ··· 397 398 399 400 401 402 403 404 405 ··· 407 下一页