余小张

 

2023年3月2日

C语言1.基础语句, sprintf

摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 5 阅读全文

posted @ 2023-03-02 16:03 余小张 阅读(27) 评论(0) 推荐(0) 编辑

C语言1.基础语句, scanf

摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 5 阅读全文

posted @ 2023-03-02 15:58 余小张 阅读(17) 评论(0) 推荐(0) 编辑

C语言1.基础语句, printf

摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 5 阅读全文

posted @ 2023-03-02 15:42 余小张 阅读(134) 评论(0) 推荐(0) 编辑

2019年12月6日

shell脚本学习 (10) 从结构化文本提取数据

摘要: 1提取/ 后的数据 2 第一个-e 的=是区域分割符, 最终这句是把 /后的数据都替换成空 第二个e 是利用三个子模式,来完成排序 's=^\([^:]*\):\(.*\) \([^ ]*\)=\1:\3, \2=' 第一个子模式 ^\([^:]*\) 匹配开头的非:字符串 第二个子模式 \(.*\ 阅读全文

posted @ 2019-12-06 18:53 余小张 阅读(626) 评论(0) 推荐(0) 编辑

shell脚本学习 (9) 提取开头或结尾的几行

摘要: 1 提取开头的n行 用head awk或者 sed实现 do.txt文件 2 显示行尾的几行 用tail -n file 阅读全文

posted @ 2019-12-06 16:10 余小张 阅读(1026) 评论(0) 推荐(0) 编辑

2019年12月5日

shell脚本学习 (8) fmt 格式化段落

摘要: 1 获取系统中的字典文件 -n隐藏查找过程 -e 匹配多次,只打印带p的行(不能写成-e -n) 会显示1-100行的字母 2 fmt 按默认格式化为20列,最大能有75列 3 fmt 长的行绕到下一行,短的行保持不变的方法 测试,只是一串很长的字符串是不会被分割的, 但这一行如果很长, 且带有两个 阅读全文

posted @ 2019-12-05 10:27 余小张 阅读(470) 评论(0) 推荐(0) 编辑

2019年12月3日

接触python的第2天:了解变量和打印

摘要: 1变量不用定义类型, 可以直接赋值 2 变量类型可以直接用type显示 3 print 可以打印数值,里面要有‘’ 或 “” 错误示范: >>> print(hello)Traceback (most recent call last): File "<pyshell#11>", line 1, i 阅读全文

posted @ 2019-12-03 18:50 余小张 阅读(213) 评论(0) 推荐(0) 编辑

2019年11月14日

接触python的第1天:测试hello world

摘要: 在python3.8的平台可以输入了hello world, ide还能当做计算器 阅读全文

posted @ 2019-11-14 18:51 余小张 阅读(216) 评论(0) 推荐(0) 编辑

2019年10月30日

shell脚本学习(7)sort

摘要: 1 sort的格式 sort [options] [files] sort 参数 文件 2 参数 -t 用单个符char作为默认的字段分隔符, 默认字段分隔符是空白 参数-k 用来定义排序键值字段 一般是 -t分割好字段, 再在字段中 原始数据 t:说明原数据 按:分段 k1 说明指定字段1, 键值 阅读全文

posted @ 2019-10-30 16:15 余小张 阅读(584) 评论(0) 推荐(0) 编辑

shell脚本学习(6)awk 编排字段

摘要: awk能取出文本字段重新编排 1 awk的用法 awk ‘program’ [file] 2 其中program 可以写成 ‘parrtern {action}’ pattern 或 action可以只写一个, 只写一个action的 ‘{print 0}’ 就执行action 只写一个patter 阅读全文

posted @ 2019-10-30 11:23 余小张 阅读(291) 评论(0) 推荐(0) 编辑

导航