随笔分类 - linux shell
摘要:1、测试数据 root@ubuntu01:/home/test2# cat test.txt ## 实现将每一行按照第二行数字指定的行数重复 1 3 e3rt idf 2 2 32 ffj 3 5 cc kkk 4 4 wf 34 2、while + for双循环实现 root@ubuntu01:/
阅读全文
摘要:1、问题 apt install 慢, 如下: root@ubuntu01:/home/test# apt install git 2、解决方法 root@ubuntu01:/home/test# cd /etc/apt/ root@ubuntu01:/etc/apt# ls apt.conf.d
阅读全文
摘要:问题 1、apt remove net-tools Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. 2、结束这个占用的进程 root@ubuntu01:~# kill -9 5937 3、测试 root@
阅读全文
摘要:1、查看内核 2、安装open-vm-tools sudo apt-get install open-vm-tools sudo apt-get install open-vm-tools-desktop 3、重启即可 reboot reboot
阅读全文
摘要:1、测试数据 root@PC1:/home/test# cat a.fna ## 实现将碱基转换为1行, 其他信息不变 >NC_019458.2 Ovis aries breed Texel chromosome 1, Oar_v4.0, [whole genome shotgun sequence
阅读全文
摘要:1、直接测试 root@PC1:/home/test# ls a.fna root@PC1:/home/test# cat a.fna >NC_019458.2 Ovis aries breed Texel chromosome 1, Oar_v4.0, [whole genome shotgun
阅读全文
摘要:1、head 直接实现 root@PC1:/home/test# ls a.txt b.txt c.txt root@PC1:/home/test# cat a.txt 1 2 3 4 5 root@PC1:/home/test# cat b.txt 06 07 08 09 10 root@PC1:
阅读全文
摘要:1、在所有行后面添加空行,awk实现 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt i 3 a d g x 8 6 k m x a a y n root@PC1:/home/test# awk '{print $0, "\n
阅读全文
摘要:1、[^xx] 表示取反 root@PC1:/home/test# ls a.txt root@PC1:/home/test# cat a.txt ## 测试数据 333 d g 8 3 d g ! _ d g ! ! ! , . ? root@PC1:/home/test# grep -v "3"
阅读全文
摘要:(一) 1、测试 [root@centos79 test2]# ls source.txt [root@centos79 test2]# cat source.txt ## 首先准备了3个下载资源 https://s3.amazonaws.com/plink1-assets/plink_linux_
阅读全文
摘要:1、问题 2、以管理员身份运行dos 然后输入:bcdedit /set hypervisorlaunchtype off (开启方法:bcdedit /set hypervisorlaunchtype auto ), 并使用bcdedit /enum命令检查 3、 关闭Hyper-V 打开控制面板
阅读全文
摘要:1、点击右下角setting 2、更换国内阿里源:https://9cpn8tt6.mirror.aliyuncs.com,然后应用即可 3、不到一分钟,pull了7个G,比之前快多了
阅读全文
摘要:来源:https://blog.csdn.net/systiger/article/details/107670404 想玩docker的话:以管理员身份运行cmd:bcdedit /set hypervisorlaunchtype auto重启;想玩虚拟机的话:以管理员身份运行cmd:bcdedi
阅读全文
摘要:1、三个关键概念 镜像(类似操作系统)、 容器(独立环境,集装箱)、 仓库(储存镜像)。 2、常用命令 a、docker info ## 查看基本信息 C:\Users\75377>docker info Client: Debug Mode: false Plugins: compose: Doc
阅读全文
摘要:1、测试数据 root@PC1:/home/test/test/test2# cat nuc.ped G G C C G G G G A G A A G G G C G G G G G G A A G G C C G G G G G G A A G G C C G G G G G G A A G G
阅读全文
摘要:1、测试数据 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 2、awk命令实现 root@PC1:/home/test2# cat a.txt 1 e d 2 a g 3 w e 4 d
阅读全文
摘要:1、测试数据 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 1 2 3 4 5 6 7 8 e a w d g e l i d g e g j j m n 2、将连续的两列数据转换成一列数据 root@PC1:/home
阅读全文
摘要:1、统计每行中特定字符出现的次数 root@PC1:/home/test/test# cat a.txt w d t i d g e d t c d t j k j j k k k j root@PC1:/home/test/test# awk '{print gsub(/d/,"&")}' a.t
阅读全文
摘要:1、测试数据 root@PC1:/home/test/test# cat a.txt w d t d g e t c d root@PC1:/home/test/test# awk -v RS="@#$j" '{print gsub(/d/,"&")}' a.txt ##RS是输出分割符,定义特殊分
阅读全文
摘要:1、脚本只有10行,报第11行错误?? [root@centos79 test]# bash test.sh test.sh: line 11: syntax error: unexpected end of file [root@centos79 test]# cat -n test.sh 1 #
阅读全文