上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 367 下一页
摘要: 001、q,表示退出(匹配地址后退出sed脚本) [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 22 jj yy ss ff xx zz vv bb dd 00 ss 99 cc mm bb tt yy [root@PC1 阅读全文
posted @ 2023-02-25 17:14 小鲨鱼2018 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 001、指定列的输入分隔符 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt aa:bb:cc 11:22:33 55:88:33 [root@PC1 test]# awk -F ":" '{print $2}' a.txt ## 使用-F 选 阅读全文
posted @ 2023-02-25 17:08 小鲨鱼2018 阅读(2194) 评论(0) 推荐(0) 编辑
摘要: 001、 ctrl + a: 将光标移动到命令行的开头,相当于键盘中的home键 002、 ctrl + e: 将光标移动到命令行的结尾,相当于键盘中的end键 003、ctrl + u: 剪切光标所在位置之前的内容 004、ctrl + k: 剪切光标所在位置之后的内容 005、ctrl + y: 阅读全文
posted @ 2023-02-25 09:48 小鲨鱼2018 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 001、普通数组 普通数组的定义: ay=(100 200 300 "aa" "bb") ## 直接定义 [root@PC1 test]# ay2[0]=800 ## 单独定义每一个元素 [root@PC1 test]# ay2[1]="aaaa" [root@PC1 test]# ay2[2]=5 阅读全文
posted @ 2023-02-24 23:48 小鲨鱼2018 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test]# ls test.sh [root@PC1 test]# cat test.sh ## 测试脚本 #!/bin/bash read -p "please input an character:" key ## 给变量key赋值 case $key in ## 阅读全文
posted @ 2023-02-24 22:52 小鲨鱼2018 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 a b c 3 d b e 7 a d e 8 z b c 4 a d e 1 [root@PC1 test]# awk '{array[$2] += $4} END 阅读全文
posted @ 2023-02-24 12:27 小鲨鱼2018 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 aa bb kk aa qq kk 11 kk dd kk mm xx [root@PC1 test]# cat -A a.txt ## 可以看到有tab制表符 aa^ 阅读全文
posted @ 2023-02-22 22:40 小鲨鱼2018 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 aa bb cc dd 11 22 33 [root@PC1 test]# cat -A a.txt ## cat -A , tab键显示为^I aa bb^Icc^I 阅读全文
posted @ 2023-02-22 22:33 小鲨鱼2018 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 001、 [b20223040323@admin1 test]$ ls test.fa [b20223040323@admin1 test]$ cat test.fa ## 测试数据 >chr1 aabbccdd eeff >chr2 xxyyzzqq gg >chr3 ddjjiill ssff 阅读全文
posted @ 2023-02-22 08:49 小鲨鱼2018 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 001、 root@ubuntu01:/home/test# ls a.txt root@ubuntu01:/home/test# cat a.txt ## 测试数据 2,7 3.23 72 3!8\34 34+3 444 root@ubuntu01:/home/test# awk '{print 阅读全文
posted @ 2023-02-17 23:16 小鲨鱼2018 阅读(300) 评论(0) 推荐(0) 编辑
上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 367 下一页