随笔分类 - linux shell
摘要:001、 [root@pc1 test3]# ls a.txt [root@pc1 test3]# cat a.txt ## 测试数据 ad_33;hh_kk dd;ff;dd;77 uu_77_88_99 [root@pc1 test3]# awk -F "[_;]" '{print $2}' a
阅读全文
摘要:001、shell实现 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 1 4 6 10 8 16 17 20 [root@pc1 test2]# cat a.txt | tr " " "\n" | sed -e '1d'
阅读全文
摘要:001、 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 ab cd kk jj ee rr tt tt ss nn bb rr [root@pc1 test2]# rev a.txt | sed 's/ /_/' | r
阅读全文
摘要:001、 [root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 NC_003074.8 1000177 1000243 exon141402 NC_003074.8 1000177 1000243 exon141414 NC_0
阅读全文
摘要:001、问题 /usr/bin/ld: cannot find -lm 002、解决方法 yum install glibc-static
阅读全文
摘要:001、问题 File "/usr/bin/yum", line 30 002、问题原因 yum采用python作为命令解释器,系统自带的为python2.7, 安装了python3版本,造成不匹配 003、解决办法 修改/usr/bin/yum,把#!/usr/bin/python修改为#!/us
阅读全文
摘要:001、 [root@pc1 test]# ls a.sh [root@pc1 test]# cat a.sh ## 测试程序 #!/bin/bash for ((i = 1; i <= 3; i++)) do echo " outer loop:$i " for ((j = 1; j <= 3;
阅读全文
摘要:001、 [root@pc1 test3]# ls GCF_000001405.40_GRCh38.p14_genomic.gff [root@pc1 test3]# awk '$3 == "gene" {split($9, a, ";"); for(i in a) {split(a[i], b,
阅读全文
摘要:001、基本用法 [root@pc1 test4]# ls a.txt [root@pc1 test4]# cat a.txt a b c d b e a d e z b c a d e [root@pc1 test4]# awk '{print ay[$2]++}' a.txt 0 1 0 2 1
阅读全文
摘要:001、提取文件的最后几列 [root@pc1 test3]# ls a.txt [root@pc1 test3]# cat a.txt ## 测试文件 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 0
阅读全文
摘要:001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 02
阅读全文
摘要:-b:以字节为单位进行截取。 -c:以字符为单位进行截取。 001、 [root@PC1 test1]# ls a.txt b.txt [root@PC1 test1]# cat a.txt ewr23436546cfgfd [root@PC1 test1]# cut -b 2 a.txt w [r
阅读全文
摘要:001、跳转到指定列 n + | (管道) 或者 0nl(小写的L) 002、跳转到行首、行尾 0:行首 $:行尾 home:行首 end:行尾 003、左右移动 nl(小写的L):向右移动n位 hl(小写的L):向左移动n位
阅读全文
摘要:001、问题 解决方法如下: 001、win + i打开设置, 点击隐私与安全性 002、点window安全中心 003、点设备安全性 004、点击内核隔离详细信息 005、将该选项关闭 006、重启计算机、测试,没有问题了。
阅读全文
摘要:000、问题如下: 001、 002、 003、 004、勾选 005、 参考:https://www.cnblogs.com/zouhuaxin/p/16732666.html
阅读全文
摘要:001、打包 [root@pc1 test3]# ls a.txt b.txt c.map df110 tmp1 [root@pc1 test3]# tar -cf all.tar * ## 打包 [root@pc1 test3]# ls all.tar a.txt b.txt c.map df11
阅读全文
摘要:001、 [root@pc1 test3]# ls a.txt [root@pc1 test3]# cat a.txt ## 测试数据 r d u y f s x v y [root@pc1 test3]# rev a.txt ## 实现按列反转 u d r s f y y v x
阅读全文
摘要:001、 [root@pc1 test]# cat a.txt 1 2 3 4 5 6 7 8 9 10 [root@pc1 test]# awk -v a=$(awk 'END{if(NR % 3 != 0) {printf("%d", NR / 3 + 1)} else {print NR /
阅读全文
摘要:001、 [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt ## 测试数据 1 2 3 4 5 6 7 8 9 10 ## 转换为两列数据 [root@pc1 test]# cat a.txt | paste -s -d " " | awk '
阅读全文
摘要:001、paste -s 实现 [root@pc1 test]# ls a.txt [root@pc1 test]# cat a.txt 1 2 3 4 5 [root@pc1 test]# paste -s a.txt ## paste 将一列数据转换为一行数据 1 2 3 4 5 [root@p
阅读全文

浙公网安备 33010602011771号