随笔分类 - linux shell
摘要:1、问题 [root@rhelpc1 software]# git clone https://github.com/BGI-shenzhen/PopLDdecay.git bash: git: command not found... 2、解决方法(REDHAT系列) [root@rhelpc1
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test3# ls a.txt root@DESKTOP-1N42TVH:/home/test3# cat a.txt e t d u e i a d g g z j c b d e w l z c b h j h 2、形式1 ro
阅读全文
摘要:1、 root@DESKTOP-1N42TVH:/home/test3# ls a.txt root@DESKTOP-1N42TVH:/home/test3# cat a.txt chr168 0.5 0.66 0.77 0.3 chr254 0.6 0.3 0.89 chr678 0.658 0.
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt 3 1 4 2 1 2 6 3 2 1 3 3 2、计算每行数据的和 root@DESKTOP-1N42TVH:
阅读全文
摘要:1、删除空行 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt df gfdg df gg er fd gg ww kkkk jjjj root@DESKTOP-1N42TVH
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test3# ls a.txt root@DESKTOP-1N42TVH:/home/test3# cat a.txt chr168 0.5 0.66 0.77 0.3 chr254 0.6 0.3 0.89 chr678 0.65
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test3# ls a.txt root@DESKTOP-1N42TVH:/home/test3# cat a.txt ## 测试数据 01 02 AAA 03 04 05 BBB 06 07 08 CCC 09 10 2、匹配AA
阅读全文
摘要:1、测试数据 root@DESKTOP-1N42TVH:/home/test3# ls a.txt root@DESKTOP-1N42TVH:/home/test3# cat a.txt ## 测试数据 aaaa bbbb cccc dddd eeee ffff 2、sed实现 root@DESKT
阅读全文
摘要:1、直接测试 root@DESKTOP-1N42TVH:/home/test2# ls a.txt root@DESKTOP-1N42TVH:/home/test2# cat a.txt d g u k d g u k s d g c s d g c x v d e x v d e s q e t
阅读全文
摘要:1、 root@DESKTOP-1N42TVH:/home/test# ls outcome.map.gz root@DESKTOP-1N42TVH:/home/test# cat outcome.map.gz | head -n 5 ## 执行以上命令直接乱码 2、 root@DESKTOP-1N
阅读全文
摘要:1、 root@DESKTOP-1N42TVH:/home/test# ls outcome.map root@DESKTOP-1N42TVH:/home/test# wc -l outcome.map ## 测试文件 46827 outcome.map root@DESKTOP-1N42TVH:/
阅读全文
摘要:1、直接解压, 不保留原始文件 root@DESKTOP-1N42TVH:/home/test# ls outcome.map.gz root@DESKTOP-1N42TVH:/home/test# gzip -d outcome.map.gz root@DESKTOP-1N42TVH:/home/
阅读全文
摘要:来源:https://www.jianshu.com/p/cdf7caa0714d 作者:JeremyL链接:https://www.jianshu.com/p/cdf7caa0714d来源:简书 远程连接虚拟机中ubuntu报错:Network error:Connection refused 检
阅读全文
摘要:1、测试数据 [root@centos7pc1 test2]# cat test.txt 1 x c 2 s d 3 e t 4 d s 5 j u 6 n x 2、程序 [root@centos7pc1 test2]# cat swap.sh #!/bin/bash temp1=$(sed -n
阅读全文
摘要:1、直接测试 [root@centos7pc1 test3]# ls test.sh [root@centos7pc1 test3]# cat test.sh ## 测试脚本 #!/bin/bash NUM=3 while [ $NUM -gt 0 ] ## 循环条件 do echo "xxxxx"
阅读全文
摘要:$RANDOM 是linux中的内置变量,可以随机生成 0~32767之间的整数数字。 1、取0~9的随机数 [root@centos7pc1 test3]# ls [root@centos7pc1 test3]# expr $RANDOM % 10 7 [root@centos7pc1 test3
阅读全文
摘要:1、expr命令实现在命令行中的四则运算 [root@centos7pc1 test3]# ls [root@centos7pc1 test3]# expr 10 + 5 ## 数字和运算符的两侧必须有空格 15 [root@centos7pc1 test3]# expr 10+5 10+5 [ro
阅读全文
摘要:1、测试数据 [root@centos7pc1 test3]# ls a.txt [root@centos7pc1 test3]# cat a.txt ddfg uujj mmkk xxuu zzdd mmuh zzvv ddee 2、sed实现 [root@centos7pc1 test3]# l
阅读全文
摘要:1、直接测试 [root@centos7pc1 test3]# ls [root@centos7pc1 test3]# a=10 [root@centos7pc1 test3]# echo $a 10 [root@centos7pc1 test3]# b=a+5 ## 变量没有$则直接输出了变量名
阅读全文
摘要:1、测试数据 [root@centos7pc1 test3]# ls a.txt [root@centos7pc1 test3]# cat a.txt GGTGCAATAT GGTGCAATAT GGTGCAATAT GGTGCAATAT 2、将连续的字符转换为中间具有空格的字符 [root@cen
阅读全文

浙公网安备 33010602011771号