随笔分类 - linux shell
摘要:001、yum报错 (base) [root@PC1 yum.repos.d]# yum install httpd ## yum安装应用报错 。 002、解决方法 (base) [root@PC1 home]# cd /etc/yum.repos.d (base) [root@PC1 yum.re
阅读全文
摘要:001、 002、 003、 前景色全部改为0 004、 背景色全部改为255 。
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 abcd KHG DETT dre ssae rtE [root@PC1 test]# awk '{$1 = toupper(substr($1, 1, 1)) sub
阅读全文
摘要:001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试数据,对如下文本按照a、b进行排序输出 01 02b 03 04 05 06a 07 08 09 10b 11 12 13 14b 15 16 17 18a 19 20
阅读全文
摘要:001、简单测试 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试数据 01 02 03b 34 05 86 87a 98 09 10 41b 12 13 54 15i 16 17 18 19a 20 [root@PC1 tes
阅读全文
摘要:001、 [root@PC1 test1]# ls a.txt [root@PC1 test1]# cat a.txt ## 测试数据 fasp.sra.ebi.ac.uk:/vol1/fastq/SRR131/072/SRR13178372/SRR13178372.fastq.gz;fasp.sr
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 kk 05 06 07 08 09 10 11 12 [root@PC1 test]# sed '' a.txt ## 说明在默认情况下,sed
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 [root@PC1 test]# sed -n 'n;p' a.txt ## 输出偶数行 03
阅读全文
摘要:Linux 中sed命令n和N选项的应用
阅读全文
摘要:Linux 中 sed命令 h和H选项的应用
阅读全文
摘要:001、 [root@PC1 test]# cat -A a ## 测试文本 1 2$ 3 4$ 5 6$ 7 8$ [root@PC1 test]# awk '{print "$1="$1; getline; print "$2="$2}' a ## getline 会读入下一行,并对下一行按照a
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试文本 1 01 02 03 04 2 05 06 07 08 3 09 10 11 12 4 13 14 15 16 5 17 18 19 20 6 21 22 23 24
阅读全文
摘要:001、grep 中 -h表示只显示匹配的内容,而不显示匹配的文件 [root@PC1 test]# ls a.txt b.txt [root@PC1 test]# grep "2" * ## 正常情况下有多个文件匹配到内容的时候,会现实匹配的文件名 a.txt:01 02 03 04 a.txt:
阅读全文
摘要:001、 [root@localhost test]# cat b.txt ## 测试数据 0001 20081223efs333kjfdj EREADFASDLKJCV 0002 20081208djfks2288daa JDKFJALSDJFsddf 0003 20081208efskjfdj
阅读全文
摘要:001、测试数据 [root@localhost test2]# ls a.txt [root@localhost 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
阅读全文
摘要:001、sub的用法 [root@localhost test]# ls a.txt [root@localhost test]# cat a.txt ## 测试数据 01 02aa 03aa 04 05 06aa 07kk 08 09 10kk 11aa 12 13 14jj 15tt 16 17
阅读全文
摘要:001、 [root@localhost test]# ls a.txt [root@localhost test]# cat a.txt ## 测试数据 aadd kk;gene=ABEK:ett 8735 fdfk jj;gene=IYNF:34DF UYG [root@localhost te
阅读全文
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试文本 abk akkkkccc 8777 ,,, aaaf 333444 uukk22 [root@PC1 test]# cat a.txt | tr -s [:alnum:
阅读全文