会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
58
59
60
61
62
63
64
65
66
···
407
下一页
2024年2月23日
linux 中 awk 之 sub、gsub、substr、index、match函数的用法
摘要: 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)
2024年2月22日
slurm中显示所有的节点、或单个节点信息
摘要: 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)
slurm系统中 sacct 命令
摘要: 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)
2024年2月21日
linux 中 sed命令将 每行最后一个出现的指定字符替换为指定的字符
摘要: 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)
2024年2月20日
linux 中 awk的特殊内置变量
摘要: 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)
linux 中 xargs -i 和-I参数的差异与用法
摘要: 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)
linux 中字符串扩展处理
摘要: 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)
linux 中国 xargs 格式化输出参数
摘要: 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选项
摘要: 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)
linux 中sed 命令设置从第n个开始替换
摘要: 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
下一页
公告