摘要: 两者都返回首次匹配字符串的索引,re.match函数只从头开始匹配, re.search函数不限制只从头开始匹配。 001、re.match函数 [root@PC1 test2]# python3 Python 3.10.9 (main, Mar 1 2023, 18:23:06) [GCC 11. 阅读全文
posted @ 2023-05-31 13:03 小鲨鱼2018 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 001、判断文件是否存在 (base) [root@PC1 test4]# ls a.txt dir01 (base) [root@PC1 test4]# if [ -e a.txt ]; then echo "exist"; fi ## 判断文件是否存在 exist (base) [root@PC 阅读全文
posted @ 2023-05-31 08:41 小鲨鱼2018 阅读(4841) 评论(0) 推荐(0) 编辑
摘要: 001、代码 dat <- c(3, 8, 2, 9, 4) k <- barplot(dat, axes = FALSE, ylim = c(-4, 10) ,names.arg = FALSE) axis(2, at = seq(0, 10, 2)) label <- paste0("label 阅读全文
posted @ 2023-05-31 00:33 小鲨鱼2018 阅读(692) 评论(0) 推荐(0) 编辑