摘要: 001、将每行的首字母大写 a、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文件 aa bb cc dd ee ff gg hh qq [root@PC1 test1]# sed 's/^[a-z]/\U&/' a.txt 阅读全文
posted @ 2024-02-15 17:51 小鲨鱼2018 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 aa bb ee 33 ff rr aa ff yy [root@PC1 test1]# awk 'NR == 2 {printf("%s\t%d\n", $2, 阅读全文
posted @ 2024-02-15 17:50 小鲨鱼2018 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 001、print函数 a、简单输出 > print(100) ## 输出数值 [1] 100 > print("abcd") ## 输出字符串 [1] "abcd" b、输出变量 > a <- 100 > b <- "xyz" > print(a) ## 输出数值变量 [1] 100 > prin 阅读全文
posted @ 2024-02-15 10:23 小鲨鱼2018 阅读(380) 评论(0) 推荐(0) 编辑