随笔分类 -  linux shell

上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 78 下一页
摘要:1、 \s表示空白字符。 \S表示非空白字符。 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt a abckf ff b dfabc fd c abc drfd d df.abcfd fd e df~abc dr f abc.df fd g 阅读全文
posted @ 2022-06-03 11:36 小鲨鱼2018 阅读(3093) 评论(0) 推荐(0)
摘要:001、问题 [root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt ## 测试数据 73 dar 87 32 dar.3 fdg fd dar-5 dg df dar~df gfdg df ee.dar 34 er fd-dar 767 df df 阅读全文
posted @ 2022-06-03 11:27 小鲨鱼2018 阅读(75) 评论(0) 推荐(0)
摘要:1、 [root@PC1 test3]# ls a.txt [root@PC1 test3]# cat a.txt ## 测试数据 8.34565 3.23445 7.32423 0 8.343532523 5.34355 3.355623253 0 0 [root@PC1 test3]# awk 阅读全文
posted @ 2022-06-02 18:18 小鲨鱼2018 阅读(450) 评论(0) 推荐(0)
摘要:1、 [root@PC1 test2]# ls a.txt b.txt test.sh [root@PC1 test2]# cat a.txt ## 测试数据 8 2 4 8 7 3 [root@PC1 test2]# cat b.txt 8 3 4 8 5 3 6 [root@PC1 test2] 阅读全文
posted @ 2022-06-01 20:38 小鲨鱼2018 阅读(442) 评论(0) 推荐(0)
摘要:1、 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt 8 4 2 2 8 3 1 3 4 3 4 6 [root@PC1 test2]# awk 'BEGIN{a = 0} {print $1 - a; a = $1}' a.txt ## 阅读全文
posted @ 2022-06-01 17:38 小鲨鱼2018 阅读(83) 评论(0) 推荐(0)
摘要:1、输出列的累加和 [root@PC1 test2]# ls a.txt [root@PC1 test2]# cat a.txt 8 4 2 2 8 3 1 3 4 3 4 6 [root@PC1 test2]# awk '{sum += $1} {print sum}' a.txt ## 第一列累 阅读全文
posted @ 2022-06-01 13:30 小鲨鱼2018 阅读(2747) 评论(0) 推荐(0)
摘要:1、date命令 [root@PC1 home]# date ## 显示当前时间 Tue May 31 16:39:18 EDT 2022 [root@PC1 home]# date "+%H:%M:%S" ## 时分秒 16:39:29 [root@PC1 home]# date "+%Y-%m- 阅读全文
posted @ 2022-05-31 20:45 小鲨鱼2018 阅读(3984) 评论(0) 推荐(0)
摘要:1、查看系统 [root@PC1 home]# cat /etc/redhat-release Red Hat Enterprise Linux release 9.0 (Plow) 2、测试yum仓库 [root@PC1 home]# yum install httpd Updating Subs 阅读全文
posted @ 2022-05-31 17:47 小鲨鱼2018 阅读(2610) 评论(0) 推荐(0)
摘要:1、查看系统 [root@PC1 home]# cat /etc/system-release Red Hat Enterprise Linux release 9.0 (Plow) 2、当前IP [root@PC1 home]# ifconfig | head ens160: flags=4163 阅读全文
posted @ 2022-05-31 17:28 小鲨鱼2018 阅读(264) 评论(0) 推荐(0)
摘要:1、查看系统 [root@PC1 network-scripts]# hostnamectl Static hostname: PC1 Icon name: computer-vm Chassis: vm 🖴 Machine ID: 43d69e6f6dc9444d83a0047a6a16c037 阅读全文
posted @ 2022-05-30 23:38 小鲨鱼2018 阅读(2439) 评论(0) 推荐(0)
摘要:1、测试yum仓库 [root@localhost ~]# yum install httpd Updating Subscription Management repositories. Unable to read consumer identity This system is not reg 阅读全文
posted @ 2022-05-30 22:52 小鲨鱼2018 阅读(3109) 评论(0) 推荐(0)
摘要:1、系统 [root@localhost ~]# cat /etc/system-release Red Hat Enterprise Linux release 8.5 (Ootpa) 2、点击网络设置 3、 4、 5、 6、 7、 8、 [root@localhost ~]# ifconfig 阅读全文
posted @ 2022-05-30 22:38 小鲨鱼2018 阅读(250) 评论(0) 推荐(0)
摘要:1、系统 [root@localhost ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa) 2、进入/etc/sysconfig/network-scripts/目录,编辑目录下网卡配置文件: [root 阅读全文
posted @ 2022-05-30 22:09 小鲨鱼2018 阅读(2788) 评论(0) 推荐(0)
摘要:001、 root@PC1:/home/test2# ls test.txt root@PC1:/home/test2# cat test.txt ## 测试数据 chr logl_H1 l_remle p_wald 1 -3.078836e+03 1.000000e+05 6.973924e-01 阅读全文
posted @ 2022-05-30 20:10 小鲨鱼2018 阅读(1571) 评论(0) 推荐(0)
摘要:1、 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt ## 测试数据 3.3724 34.348 988.383 0.0001 34.837 381.439 3.2534 32.732 358.346 root@PC1:/ 阅读全文
posted @ 2022-05-30 19:41 小鲨鱼2018 阅读(2734) 评论(0) 推荐(0)
摘要:001、 +号的作用是匹配前面字符1次或连续任意多次 root@PC1:/home/test/test# ls a.txt root@PC1:/home/test/test# cat a.txt aaaabxa xxxxbxa root@PC1:/home/test/test# sed 's/a+/ 阅读全文
posted @ 2022-05-29 18:56 小鲨鱼2018 阅读(768) 评论(0) 推荐(0)
摘要:1、测试数据 root@PC1:/home/test/test# ls uma.txt root@PC1:/home/test/test# cat -A uma.txt 0^M^IAAACGCTGTAGCCA-1$ 0^M^IAAACTTGATCCAGA-1$ 1^M^IAAAGAGACGAGATA 阅读全文
posted @ 2022-05-28 21:39 小鲨鱼2018 阅读(158) 评论(0) 推荐(0)
摘要:1、 root@PC1:/home/test4# ls a.txt b.txt root@PC1:/home/test4# cat a.txt a a b b c d e root@PC1:/home/test4# cat b.txt c d e f f g root@PC1:/home/test4 阅读全文
posted @ 2022-05-27 11:40 小鲨鱼2018 阅读(61) 评论(0) 推荐(0)
摘要:1、测试数据 root@PC1:/home/test4# ls a.txt b.txt root@PC1:/home/test4# cat a.txt a b c d e root@PC1:/home/test4# cat b.txt c d d xef e f g 2、grep -f选项的作用表示 阅读全文
posted @ 2022-05-27 11:30 小鲨鱼2018 阅读(2962) 评论(0) 推荐(0)
摘要:分类1:当两个文件没有重复项时。 1、测试数据 root@PC1:/home/test4# ls a.txt b.txt root@PC1:/home/test4# cat a.txt ## 测试数据 a b c d e root@PC1:/home/test4# cat b.txt c d e f 阅读全文
posted @ 2022-05-27 11:03 小鲨鱼2018 阅读(244) 评论(0) 推荐(0)

上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 78 下一页