随笔分类 -  linux shell

上一页 1 2 3 4 5 6 7 8 9 ··· 74 下一页
摘要:001、Linux awk中如何删除数组 (base) [b20223040323@admin2 test]$ cut -f 5-6 rt288_2_3.bim | paste - <(cut -f 5-6 yt4_2_3.bim ) | head C A 0 A T C C T C A C A A 阅读全文
posted @ 2024-07-10 21:23 小鲨鱼2018 阅读(19) 评论(0) 推荐(0) 编辑
摘要:001、 -P选项表示 perl正则兼容 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 05 中国农副业 06 07 河南 08 09 10 [root@PC1 test]# cat a.txt | 阅读全文
posted @ 2024-07-09 13:06 小鲨鱼2018 阅读(156) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 05 中国农副业 06 07 河南 08 09 10 [root@PC1 test]# cat a.txt | grep -P '[\x{4e0 阅读全文
posted @ 2024-07-09 13:05 小鲨鱼2018 阅读(149) 评论(0) 推荐(0) 编辑
摘要:001、grep命令报错如下 [root@PC1 test]# echo "你好世界" | grep -P '[\u4e00-\u9fff]+' grep: PCRE does not support \L, \l, \N{name}, \U, or \u 002、解决方法(把U改为x;同时中间用中 阅读全文
posted @ 2024-07-09 13:00 小鲨鱼2018 阅读(0) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test2]# ls test.sh [root@PC1 test2]# cat test.sh ## 脚本 #!/bin/bash seq 10000000000000000000000000000000000000 &> /dev/null [root@PC1 te 阅读全文
posted @ 2024-06-23 15:30 小鲨鱼2018 阅读(11) 评论(0) 推荐(0) 编辑
摘要:001、方法1 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 阅读全文
posted @ 2024-06-23 15:16 小鲨鱼2018 阅读(41) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 阅读全文
posted @ 2024-06-23 15:08 小鲨鱼2018 阅读(48) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test3]# echo "Hello, my name is aming."|grep -P '(?<=Hello, ).*(?= aming.)' Hello, my name is aming. 002、 [root@PC1 test3]# ifconfig | 阅读全文
posted @ 2024-06-23 14:53 小鲨鱼2018 阅读(8) 评论(0) 推荐(0) 编辑
摘要:001、 -c 选项表示中断后继续下载,即支持断点续传。 002、 -t选项表示失败后尝试的次数。 阅读全文
posted @ 2024-06-23 01:50 小鲨鱼2018 阅读(24) 评论(0) 推荐(0) 编辑
摘要:001、 [root@pc1 test]# ls a.txt b.txt c.txt d.txt e.txt f.txt g.txt h.txt index.txt [root@pc1 test]# cat index.txt ## 查找的索引文件 a.txt b.txt x.txt y.txt c 阅读全文
posted @ 2024-06-17 10:53 小鲨鱼2018 阅读(158) 评论(0) 推荐(0) 编辑
摘要:date主要用于显示日期,若是不以加号作为开头,则表示要设定时间,而时间格式为 MMDDhhmm[[CC]YY][.ss],其中 MM 为月份,DD 为日,hh 为小时,mm 为分钟,CC 为年份前两位数字,YY 为年份后两位数字,ss 为秒数。 001、最基本的用法 [root@PC1 test2 阅读全文
posted @ 2024-06-08 12:47 小鲨鱼2018 阅读(349) 评论(0) 推荐(0) 编辑
摘要:001、 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt 01 aa 02 03 04 aa 05 06 07 bb 08 09 10 bb 11 12 13 aa 14 15 16 bb 17 18 19 cc 20 21 22 cc 阅读全文
posted @ 2024-06-06 23:52 小鲨鱼2018 阅读(42) 评论(0) 推荐(0) 编辑
摘要:001、Linux中sed命令b选项屏蔽指定的处理区域 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 1 01 02 a 2 03 04 a 3 05 06 a 4 07 08 5 09 10 k 6 11 12 a 7 阅读全文
posted @ 2024-06-06 12:01 小鲨鱼2018 阅读(37) 评论(0) 推荐(0) 编辑
摘要:001、 移除后缀 [root@PC1 test2]# a="a.csv.map.txt" ## 测试变量文件名称 [root@PC1 test2]# echo $a a.csv.map.txt [root@PC1 test2]# echo ${a%.*} ## 移除后缀使用的符号是% a.csv. 阅读全文
posted @ 2024-05-26 23:51 小鲨鱼2018 阅读(564) 评论(0) 推荐(0) 编辑
摘要:001、简单测试 [root@PC1 test2]# ls [root@PC1 test2]# a="abc" ## 生成一个测试变量 [root@PC1 test2]# echo $a ## 输出变量方式1 abc [root@PC1 test2]# echo ${a} ## 输出变量方式2 ab 阅读全文
posted @ 2024-05-26 23:38 小鲨鱼2018 阅读(44) 评论(0) 推荐(0) 编辑
摘要:001、方法1(基本逻辑是先提取每组的第一行和第四行; 然后将没两行转换为1行;最后将第二行再减去第一行) [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试数据 2.699350 2.699359 2.699940 2.6999 阅读全文
posted @ 2024-05-26 22:49 小鲨鱼2018 阅读(29) 评论(0) 推荐(0) 编辑
摘要:001、点新建标签 002、 点击新建站点 003、 。 阅读全文
posted @ 2024-05-24 16:49 小鲨鱼2018 阅读(25) 评论(0) 推荐(0) 编辑
摘要:001、 Linux 中 如何判断每一行的数据都是相同的 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt ## 测试数据 aa bb cc aa bb cc aa bb cc aa kk cc aa bb cc aa bb cc [roo 阅读全文
posted @ 2024-05-20 20:35 小鲨鱼2018 阅读(18) 评论(0) 推荐(0) 编辑
摘要:在一些场景下,会遇到指定目录中出现大量的以数字命名的文件或者目录,如何实现批量删除: 001、 [root@PC1 test2]# ls ## 测试文件及目录,如何删除所有的 以数字命名的文件和目录 1 20 29 74 8 9 a.txt b.txt dir11 [root@PC1 test2]# 阅读全文
posted @ 2024-05-12 21:13 小鲨鱼2018 阅读(118) 评论(0) 推荐(0) 编辑
摘要:001、直接拆分 [root@PC1 test2]# ls outcome.map [root@PC1 test2]# cat outcome.map ## 准备一个测试文件,依据第一列来拆分文件 1 snp1 0 55910 1 snp2 0 85204 1 snp3 0 122948 2 snp 阅读全文
posted @ 2024-05-12 21:13 小鲨鱼2018 阅读(170) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 74 下一页
点击右上角即可分享
微信分享提示