Zeng's Page


  • 首页

  • 标签

  • 归档

  • 相册

  • 搜索

股价查询小工具一枚[2]

Posted on 2020-10-06 | In Python

旧版

针对有时输出对不齐作了改进,效果如下:

image-20200928004218980

Read more »

Linux basic 01 —— 读书笔记

Posted on 2020-10-02 | In Linux

《鸟哥的私房菜》在线书籍 http://linux.vbird.org/linux_basic 的笔记

磁盘的第一个扇区主要记录了两个重要信息,分别是:

  • 主要启动记录区(Master Boot Record, MBR):可以安装开机管理程序的地方,有446 bytes
  • 分区表(partition table):记录整颗硬盘分区的状态,有64 bytes
Read more »

awk命令

Posted on 2020-10-01 | In Shell
1
2
3
awk '{c[$1]++;}END{for(k in c){print k": "c[k];}}' /var/log/nginx/myalert_access.log
113.118.106.137: 17
113.116.28.35: 4171
Read more »

grep命令

Posted on 2020-10-01 | In Shell

提取匹配到的字符

1
2
3
4
5
6
7
8
9
10
11
12
[root@VM_0_13_centos demo]# cat phone.txt
987-123-4567
123 456 7890
(123) 456-7890
[root@VM_0_13_centos demo]# grep -o '\-[0-9]\{3\}' phone.txt
-123
-456
-789
[root@VM_0_13_centos demo]# grep -no '\-[0-9]\{3\}' phone.txt
1:-123
1:-456
3:-789
Read more »

sed命令

Posted on 2020-10-01 | In Shell

替换中文

1
sed 's/[^ -z]/*/g'

按行逆序输出

1
sed -e '1!G; h; $!d'
Read more »
1…678…21
Lz. Zeng

Lz. Zeng

Continuous Self-Improvement

104 发布
18 分类
28 标签
© 2022 Lz. Zeng
NexT.Pisces
 |         Words: 97.2k
0%