上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 407 下一页
摘要: 001、awk中sub函数的用法:sub用于替换,其语法如下: a、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试数据 abcdxabcd abcd xyz qmn opqriytyx abcd uny een abcdka 阅读全文
posted @ 2024-02-23 09:44 小鲨鱼2018 阅读(2537) 评论(0) 推荐(0)
摘要: 001、显示所有的节点信息 (base) [b20223040323@admin1 x_batch2_116]$ scontrol show node | head ## 显示所有的节点信息,并显示前10行 002、显示指定的节点信息 (base) [b20223040323@admin1 x_ba 阅读全文
posted @ 2024-02-22 11:56 小鲨鱼2018 阅读(251) 评论(0) 推荐(0)
摘要: 001、sacct 直接使用:显示24小时内的任务信息 (base) [b20223040323@admin1 x_batch2_116]$ sacct 002、 显示具体的某一任务信息 (base) [b20223040323@admin1 x_batch2_116]$ sacct -j 5996 阅读全文
posted @ 2024-02-22 11:42 小鲨鱼2018 阅读(560) 评论(0) 推荐(0)
摘要: 001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试文本 abcdabcd xyabdada kkkrrrtt faaafert [root@PC1 test1]# sed -r 's/(.*)(a)(.*$)/\1\3/ 阅读全文
posted @ 2024-02-21 15:01 小鲨鱼2018 阅读(363) 评论(0) 推荐(0)
摘要: 001、ARGC :命令行参数数组ARGV中元素的个数(c:count; v:variable) [root@PC1 test1]# ls a.txt b.txt [root@PC1 test1]# awk '{print ARGC}' a.txt ## ARGC:表示命令行参数数组ARGV中元素的 阅读全文
posted @ 2024-02-20 23:10 小鲨鱼2018 阅读(25) 评论(0) 推荐(0)
摘要: 001、-I [root@PC1 test1]# ls 1.txt 2.txt 3.txt dir01 [root@PC1 test1]# find *.txt | xargs -I {} mv {} dir01/ ## -I 将前边的变量存储至{},便于后续处理 [root@PC1 test1]# 阅读全文
posted @ 2024-02-20 18:25 小鲨鱼2018 阅读(195) 评论(0) 推荐(0)
摘要: 001、字符串首字母转换为大写;以及全部转换为大写 [root@PC1 test1]# str1="abcde" ## 测试字符串 [root@PC1 test1]# echo ${str1^} ## 首字母转换为大写 Abcde [root@PC1 test1]# echo ${str1^^} # 阅读全文
posted @ 2024-02-20 18:22 小鲨鱼2018 阅读(31) 评论(0) 推荐(0)
摘要: 001、 [root@pc1 tmp]# echo {1..30}|xargs printf "%02d %03d\n" 01 002 ## xargs 标准化输出参数 03 004 05 006 07 008 09 010 11 012 13 014 15 016 17 018 19 020 21 阅读全文
posted @ 2024-02-20 18:18 小鲨鱼2018 阅读(40) 评论(0) 推荐(0)
摘要: linux 中 条件判断中 -r; -n选项; 001、-r选项用于判断文件是否拥有读的权限;测试如下: a、root用户 [root@pc1 test1]# ls a.sh [root@pc1 test1]# ll -h ## 文件a.sh没有任何权限 total 4.0K . 1 root ro 阅读全文
posted @ 2024-02-20 16:26 小鲨鱼2018 阅读(151) 评论(0) 推荐(0)
摘要: 001、 [root@pc1 test1]# ls a.txt [root@pc1 test1]# cat a.txt ## 测试文件 abcdaaa kaass aa [root@pc1 test1]# sed 's/a/Q/g' a.txt ##加g; 默认是全部替换 QbcdQQQ kQQss 阅读全文
posted @ 2024-02-20 15:34 小鲨鱼2018 阅读(60) 评论(0) 推荐(0)
上一页 1 ··· 58 59 60 61 62 63 64 65 66 ··· 407 下一页