随笔分类 -  linux shell

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 78 下一页
摘要:001、 [root@PC1 test3]# ls test.txt [root@PC1 test3]# cat test.txt ## 测试数据 jjjj kkk gene jjj dddd yyy iiii ppp ffff 999 gene ttt eeee mmm aaaa nnn [roo 阅读全文
posted @ 2023-06-03 20:12 小鲨鱼2018 阅读(308) 评论(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 11 12 13 14 15 16 17 18 19 20 [root@PC1 test]# sed 's/ /tag/2' 阅读全文
posted @ 2023-06-01 15:45 小鲨鱼2018 阅读(229) 评论(0) 推荐(0)
摘要:001、判断文件是否存在 (base) [root@PC1 test4]# ls a.txt dir01 (base) [root@PC1 test4]# if [ -e a.txt ]; then echo "exist"; fi ## 判断文件是否存在 exist (base) [root@PC 阅读全文
posted @ 2023-05-31 08:41 小鲨鱼2018 阅读(7562) 评论(0) 推荐(0)
摘要:001、将所有的小写字母转换为大写 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 abd mnj uyr XDE THR QYE cvb Ddg gyi [root@PC1 test4]# sed 's/[a-z]/\U 阅读全文
posted @ 2023-05-30 21:29 小鲨鱼2018 阅读(891) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test3]# ls test1 test2 [root@PC1 test3]# tree ## 测试数据 . ├── test1 │ └── a.txt └── test2 └── b.txt 2 directories, 2 files [root@PC1 test 阅读全文
posted @ 2023-05-30 16:42 小鲨鱼2018 阅读(2965) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 aa bb cc dd kk jj ee uu rr [root@PC1 test4]# sed -n l a.txt aa bb cc$ dd\tkk\tjj$ 阅读全文
posted @ 2023-05-29 00:47 小鲨鱼2018 阅读(121) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 ee ff 88 fff aa ff uuk fff uuuu kkk yyy fff kkkk [root@PC1 test4]# awk '{print len 阅读全文
posted @ 2023-05-29 00:02 小鲨鱼2018 阅读(175) 评论(0) 推荐(0)
摘要:001、匹配空格 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 1_aa bb 2_ccdd 3_ee ff 4_gg hh kk [root@PC1 test4]# sed -n l a.txt ## 显示出空格和制表 阅读全文
posted @ 2023-05-28 23:49 小鲨鱼2018 阅读(1085) 评论(0) 推荐(0)
摘要:aaaa、#和%表示的是匹配删除 001、 # 表示从左侧删除匹配的字符, 单个#号表示非贪婪匹配, 两个#号表示贪婪匹配 [root@PC1 test]# ls [root@PC1 test]# var=http://www.aaa.com/123.htm ## 测试字符串 [root@PC1 t 阅读全文
posted @ 2023-05-28 00:10 小鲨鱼2018 阅读(30) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test]# ls a.txt b.txt c.txt [root@PC1 test]# find *.txt a.txt b.txt c.txt [root@PC1 test]# find *.txt | awk '{print "mv", $0, $0".bak"} 阅读全文
posted @ 2023-05-27 23:01 小鲨鱼2018 阅读(297) 评论(0) 推荐(0)
摘要:001、grep实现 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 234 fw3mh i86st sfg yzv e32kut zd7 utes eywq [root@PC1 test]# grep -o ".$" a.t 阅读全文
posted @ 2023-05-27 22:33 小鲨鱼2018 阅读(1188) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 30 y 10 t 40 d 20 w ## 借助数组来实现 [root@PC1 test]# awk '{ay[NR] = $1; sum += $1} END {f 阅读全文
posted @ 2023-05-25 16:53 小鲨鱼2018 阅读(304) 评论(0) 推荐(0)
摘要:001、uname -m [root@PC1 ~]# uname -m x86_64 002、arch [root@PC1 ~]# arch x86_64 003、lscpu [root@PC1 ~]# lscpu 阅读全文
posted @ 2023-05-21 23:33 小鲨鱼2018 阅读(361) 评论(0) 推荐(0)
摘要:001、查看时区 [root@PC1 bin]# timedatectl status|grep 'Time zone' Time zone: Asia/Shanghai (CST, +0800) 002、查看当前时间 [root@PC1 bin]# date Mon May 22 01:15:22 阅读全文
posted @ 2023-05-21 22:50 小鲨鱼2018 阅读(496) 评论(0) 推荐(1)
摘要:001、系统 [root@PC1 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@PC1 ~]# 002、测试D语言编译器 [root@PC1 ~]# dmd bash: dmd: command not 阅读全文
posted @ 2023-05-19 23:52 小鲨鱼2018 阅读(123) 评论(0) 推荐(0)
摘要:001、生成基因名称的列表 awk -F "\t" '$3 == "gene" && $NF ~ /gene=/ {print $NF}' chr1.gff | sed 's/\(.*\)\(gene=[^;]\+\)\(.*\)/\2/' | sort | uniq > gene.list 002 阅读全文
posted @ 2023-05-16 22:27 小鲨鱼2018 阅读(260) 评论(0) 推荐(0)
摘要:001、 [root@PC1 test4]# ls a.txt [root@PC1 test4]# cat a.txt ## 测试数据 gbkey=mRNA;gene=ATP5O;model;evidence;Supporting [root@PC1 test4]# sed 's/\(.*\)\(g 阅读全文
posted @ 2023-05-16 18:34 小鲨鱼2018 阅读(621) 评论(0) 推荐(0)
摘要:2>&1 & 0:标准输入 1:标准输出 2:标准错误输出 command 2>&1 > file.txt:将标准输出输出到file中,标准错误输出输出屏幕 command > file.txt 2>&1: 将标准错误输出 输出到标准输出中。 command 2> error.txt 1> righ 阅读全文
posted @ 2023-05-15 00:37 小鲨鱼2018 阅读(940) 评论(0) 推荐(0)
摘要:pscp属于putty软件下的命令。 001、从远端传输至本地 pscp root@192.168.254.130:/home/test/a.txt C:\Users\ljx\Desktop 002、从本地上传至远端 pscp C:\Users\ljx\Desktop\b.txt root@192. 阅读全文
posted @ 2023-05-14 23:59 小鲨鱼2018 阅读(108) 评论(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 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 阅读全文
posted @ 2023-05-13 22:16 小鲨鱼2018 阅读(136) 评论(0) 推荐(0)

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 78 下一页