随笔分类 -  linux shell

上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 77 下一页
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e e t s t e s r d g e s w t e [root@PC3 test]# cat c.txt 1 x r 阅读全文
posted @ 2021-07-24 13:28 小鲨鱼2018 阅读(294) 评论(0) 推荐(0)
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e e t s t e s r d g e s w t e [root@PC3 test]# cat b.txt 1 3 5 阅读全文
posted @ 2021-07-24 12:48 小鲨鱼2018 阅读(854) 评论(0) 推荐(0)
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e 2、将3-5列中的e替换为x [root@PC3 test]# cat a.txt e r e y e u e e e 阅读全文
posted @ 2021-07-24 12:41 小鲨鱼2018 阅读(1007) 评论(0) 推荐(0)
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r e y e u e e e g e 3 h r 1 3 e g e y e e s e e e e e 2、将每行的第3个e即其后的e替换为x [root@PC3 test]# cat a.txt e r e y e u e 阅读全文
posted @ 2021-07-24 01:58 小鲨鱼2018 阅读(230) 评论(0) 推荐(0)
摘要:1、测试数据 [root@PC3 test]# cat a.txt e r t y d a d g 4 3 1 3 d g k 2、awk实现 [root@PC3 test]# cat a.txt e r t y d a d g 4 3 1 3 d g k [root@PC3 test]# awk 阅读全文
posted @ 2021-07-24 01:50 小鲨鱼2018 阅读(81) 评论(0) 推荐(0)
摘要:1、测试数据 [root@PC3 test]# cat b.txt sfg3 dg2k 2、删除第三个字符,sed删除 [root@PC3 test]# cat b.txt sfg3 dg2k [root@PC3 test]# sed 's/.//3' b.txt sf3 dgk 3、cut删除 [ 阅读全文
posted @ 2021-07-24 01:46 小鲨鱼2018 阅读(444) 评论(0) 推荐(0)
摘要:1、free [root@PC3 /]# free total used free shared buffers cached Mem: 8162676 7297800 864876 9584 32 6237016 -/+ buffers/cache: 1060752 7101924 Swap: 8 阅读全文
posted @ 2021-07-24 01:05 小鲨鱼2018 阅读(1523) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 2、xargs [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 [root@cento 阅读全文
posted @ 2021-07-22 00:18 小鲨鱼2018 阅读(338) 评论(0) 推荐(0)
摘要:1、 [root@centos79 test]# cat a.txt test3_1_clean.fq.gz test3_2_clean.fq.gz test4_1_clean.fq.gz test4_2_clean.fq.gz test5_1_clean.fq.gz test5_2_clean.f 阅读全文
posted @ 2021-07-21 23:14 小鲨鱼2018 阅读(145) 评论(0) 推荐(0)
摘要:linux系统中批量提取指定列的数据。 1、测试数据 [root@centos79 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 03 0f 0t 0s 0g 0y 0a 0d 0e 0n 07 03 0 阅读全文
posted @ 2021-07-21 19:58 小鲨鱼2018 阅读(2062) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test]# cat a.txt 01 3 4 02 f s 03 t 3 04 s d 05 g i 06 y e 07 a w 08 d g 09 e w 10 n u 11 7 8 12 3 s 13 a d 14 g e 15 w a 16 z v 阅读全文
posted @ 2021-07-21 19:23 小鲨鱼2018 阅读(2260) 评论(0) 推荐(0)
摘要:linux系统中nl命令 1、测试数据 [root@centos79 test3]# cat a.txt e 3 8 i d f a e 8 3 s g g j 2 z t y c g s g s a 2、nl命令 [root@centos79 test3]# cat a.txt e 3 8 i d 阅读全文
posted @ 2021-07-21 13:53 小鲨鱼2018 阅读(292) 评论(0) 推荐(0)
摘要:1、 脚本如下: [root@centos79 test2]# cat test.sh #!/bin/bash if [ $# -ne 1 ] ## $#表示一共有几个参数 then echo "usage bash test.sh number" exit 1 else echo "sqrt($1 阅读全文
posted @ 2021-07-21 13:36 小鲨鱼2018 阅读(984) 评论(0) 推荐(0)
摘要:linux系统中pgrep用于查找进程 1、查找与命令相关的进程 [root@centos79 test]# pgrep sort [root@centos79 test]# 启动一个sort命令测试: [root@centos79 test]# seq -f test%03g 100000000| 阅读全文
posted @ 2021-07-21 13:16 小鲨鱼2018 阅读(205) 评论(0) 推荐(0)
摘要:1、测试文件 [root@centos79 test]# cat a.txt 3 5 6 s f s d g d e w f g e k [root@centos79 test]# cat b.txt 3 5 6 s f s d g d e w f g e k 2、直接使用diff [root@ce 阅读全文
posted @ 2021-07-19 00:33 小鲨鱼2018 阅读(166) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test]# cat -A a.txt SUN08^ISUN09^ISUN10^M$ dddd^I33333^Icdddd^M$ dddd^I11111^I55555^M$ 2、dos2unix删除 [root@centos79 test]# cat a. 阅读全文
posted @ 2021-07-17 22:56 小鲨鱼2018 阅读(414) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e 2、实现第一列和第三列的互换 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e [root@centos79 阅读全文
posted @ 2021-07-17 14:42 小鲨鱼2018 阅读(997) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e 2、删除第二列 [root@centos79 test3]# cat a.txt 3 5 6 2 s g 3 5 c f h e [root@centos79 test3] 阅读全文
posted @ 2021-07-17 14:37 小鲨鱼2018 阅读(13158) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cat b.txt 4 5 6 2 d 2 s g y 2、将b.txt中的第2列用a.txt中的第3列进行替换 [root@ce 阅读全文
posted @ 2021-07-17 01:59 小鲨鱼2018 阅读(2354) 评论(0) 推荐(0)
摘要:1、测试数据 [root@centos79 test]# cat a.txt e t q t x g a w i k h e 2、cut删除 [root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# c 阅读全文
posted @ 2021-07-17 01:53 小鲨鱼2018 阅读(5730) 评论(0) 推荐(0)

上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 77 下一页