随笔分类 -  linux shell

上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 78 下一页
摘要:001、 root@DESKTOP-1N42TVH:/home/test3# ls test.txt root@DESKTOP-1N42TVH:/home/test3# cat test.txt ## 测试数据 AKCR02000001 df AKCR02000001 df AKCR02000001 阅读全文
posted @ 2022-07-08 21:48 小鲨鱼2018 阅读(1485) 评论(0) 推荐(0)
摘要:001、 root@DESKTOP-1N42TVH:/home/test3# ls a.txt test.txt root@DESKTOP-1N42TVH:/home/test3# cat a.txt ## 测试数据, 1、2列分别为替换字符和被替换字符 1 AKCR02000001 2 AKCR0 阅读全文
posted @ 2022-07-08 21:34 小鲨鱼2018 阅读(471) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test2]# echo "dsfedw" ## 测试字符串 dsfedw [root@PC1 test2]# echo "dsfedw" | awk 'BEGIN{FS = ""}{for(i = NF; i >= 1; i--) {printf("%s", $i)} 阅读全文
posted @ 2022-07-07 18:49 小鲨鱼2018 阅读(501) 评论(0) 推荐(0)
摘要:001、 root@ubuntu2204:/home/test# ls a.txt root@ubuntu2204:/home/test# cat a.txt ## 测试数据 2324 5534 jkh sdff root@ubuntu2204:/home/test# sed 's/**/Q/' a 阅读全文
posted @ 2022-06-29 11:16 小鲨鱼2018 阅读(199) 评论(0) 推荐(0)
摘要:001、生成数组, 生成数组a root@ubuntu2204:/home/test# a[0]=800 root@ubuntu2204:/home/test# a[1]=500 root@ubuntu2204:/home/test# a[2]="kkk" root@ubuntu2204:/home 阅读全文
posted @ 2022-06-26 20:33 小鲨鱼2018 阅读(360) 评论(0) 推荐(0)
摘要:001、求每列的和 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 3 5 2 4 1 3 5 5 2 3 8 3 root@PC1:/home/test2# awk '{for(i = 1; i <= NF; i++) 阅读全文
posted @ 2022-06-20 18:02 小鲨鱼2018 阅读(309) 评论(0) 推荐(0)
摘要:001、求每列的和 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt ## 测试数据 3 5 2 4 1 3 5 5 2 3 8 3 root@PC1:/home/test2# for i in $(seq $(head - 阅读全文
posted @ 2022-06-20 17:46 小鲨鱼2018 阅读(698) 评论(0) 推荐(0)
摘要:1、001 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 1 e d 3 w e root@PC1:/home/test2# awk '{if($0 != "") {i = 0} else {i++}} END {pri 阅读全文
posted @ 2022-06-20 14:57 小鲨鱼2018 阅读(448) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 3 w e 1 e d root@PC1:/home/test2# cat -A a.txt $ $ 3 w e$ $ 1 e d$ root@PC1:/home/ 阅读全文
posted @ 2022-06-20 11:55 小鲨鱼2018 阅读(194) 评论(0) 推荐(0)
摘要:1、 root@PC1:/home/test3# ls a.txt root@PC1:/home/test3# cat a.txt 1 e d 2 a g 3 w e 4 d g 5 g j 6 e j 7 l m 8 i n root@PC1:/home/test3# a=3 ## 行号 3 ro 阅读全文
posted @ 2022-06-20 11:27 小鲨鱼2018 阅读(142) 评论(0) 推荐(0)
摘要:001、sed实现 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 1 e d 2 a g 3 w e 4 d g 5 g j 6 e j 7 l m 8 i n root@PC1:/home/test2# sed 'N; 阅读全文
posted @ 2022-06-20 10:15 小鲨鱼2018 阅读(354) 评论(0) 推荐(0)
摘要:1、1、3行互换 root@PC1:/home/test2# ls a.txt swap.sh root@PC1:/home/test2# cat a.txt 1 x c 2 s d 3 e t 4 d s 5 j u 6 n x root@PC1:/home/test2# cat swap.sh 阅读全文
posted @ 2022-06-20 10:07 小鲨鱼2018 阅读(531) 评论(0) 推荐(0)
摘要:1、001 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt Chr1 Chr11 Chr7 Chr8 Chr10 Chr2 Chr5 Chr3 root@PC1:/home/test2# sort a.txt ## 排序异 阅读全文
posted @ 2022-06-20 08:36 小鲨鱼2018 阅读(148) 评论(0) 推荐(0)
摘要:01、 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt ddd 2 8 aa 1 87 name gender score ff 2 3 ss 1 23 root@PC1:/home/test2# sort -k 3 a. 阅读全文
posted @ 2022-06-20 08:25 小鲨鱼2018 阅读(112) 评论(0) 推荐(0)
摘要:1、临时创建 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt j k e s f g x v b root@PC1:/home/test2# alias 'cat=cat -A' ## 创建命令别名 root@PC1:/h 阅读全文
posted @ 2022-06-18 12:56 小鲨鱼2018 阅读(199) 评论(0) 推荐(0)
摘要:001、测试数据 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt 1 2 3 4 5 6 7 8 9 e f s f g u d f x a d s g s c s e s z c b e g c s d f 002、提取包含 阅读全文
posted @ 2022-06-16 09:45 小鲨鱼2018 阅读(1279) 评论(0) 推荐(0)
摘要:1、系统信息 root@ubuntu2204test01:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Coden 阅读全文
posted @ 2022-06-15 09:48 小鲨鱼2018 阅读(2709) 评论(0) 推荐(0)
摘要:1、系统信息 root@ubuntu2204test01:/home# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 C 阅读全文
posted @ 2022-06-14 10:37 小鲨鱼2018 阅读(540) 评论(0) 推荐(0)
摘要:1、 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt | tee xx.txt ## 输出屏幕的结果 保存至xx.txt dd ff ii xx jj ee xx vv mm root@PC1:/home/test# ls a 阅读全文
posted @ 2022-06-13 12:07 小鲨鱼2018 阅读(1036) 评论(0) 推荐(0)
摘要:1、基本用法 wget https://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_20220402.zip 2、指定下载目录 wget -P /home/test2/ https://s3.amazonaws.com/plink1-asset 阅读全文
posted @ 2022-06-13 11:55 小鲨鱼2018 阅读(227) 评论(0) 推荐(0)

上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 78 下一页