摘要: 1、直接测试 dir() ## 列出当前目录中所有文件 myfile <- list.files() ## 将当前目录中的所有文件都保存为字符 myfile gzfile <- myfile[grep(myfile, pattern =".gz$")] ## 提取当前目录中以.gz结尾的文件 gzf 阅读全文
posted @ 2021-12-18 22:40 小鲨鱼2018 阅读(1237) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 root@PC1:/home/test# ls test.py test.txt root@PC1:/home/test# cat test.txt ## 测试数据 w r s f z s d g z c w d z d g g z c e w root@PC1:/home/test# 阅读全文
posted @ 2021-12-18 21:26 小鲨鱼2018 阅读(1418) 评论(0) 推荐(0) 编辑
摘要: 1、测试数据 root@PC1:/home/test# ls test.txt root@PC1:/home/test# cat test.txt ## 测试数据 w r s f a s d g z c w d a d g t z c e w 2、提取包含w的行 root@PC1:/home/tes 阅读全文
posted @ 2021-12-18 21:17 小鲨鱼2018 阅读(5806) 评论(0) 推荐(1) 编辑