摘要:
001、 [root@pc1 test2]# ls [root@pc1 test2]# str1="ab.cd_kk.mn_jjy" ## 测试字符串 [root@pc1 test2]# echo ${str1%%.*} ## 从左侧开始,删除.号右侧所有的内容 ab [root@pc1 test2 阅读全文
posted @ 2023-09-20 17:58
小鲨鱼2018
阅读(242)
评论(0)
推荐(0)
摘要:
001、测试文件(实现仅提取==1185== 和 其他不包含==数字==的行) [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试文件 ==1185== abcadoiafa ==1120== asvgaoj fajsdfja = 阅读全文
posted @ 2023-09-20 11:59
小鲨鱼2018
阅读(89)
评论(0)
推荐(0)
摘要:
[root@pc1 test2]# ls ##测试数据 a.txt b.csv c.ped test_dir [root@pc1 test2]# ls test_dir/ [root@pc1 test2]# find ./ -name "*.txt" -o -name "*.ped" -exec c 阅读全文
posted @ 2023-09-20 08:53
小鲨鱼2018
阅读(770)
评论(0)
推荐(0)
摘要:
001、 [root@pc1 test2]# ls [root@pc1 test2]# basename /home/test2/a.txt ## 仅仅获取文件 a.txt [root@pc1 test2]# dirname /home/test2/a.txt ## 仅仅获取路径 /home/tes 阅读全文
posted @ 2023-09-20 08:30
小鲨鱼2018
阅读(19)
评论(0)
推荐(0)

浙公网安备 33010602011771号