上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: print(" ")list2 = [1, 2, 3, 4, 5, 6, 55, 33, 66, 87]for index, item in enumerate(list2[:]): print(index,' ',item) list2.remove(item)print(list2)print( 阅读全文
posted @ 2022-04-08 23:00 狒狒桑 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 1、练习 case。。。 when 。。 then 。。 else 。。。 end as 。。。 SELECTCASE WHEN degree BETWEEN 0 AND 59 THEN '及格' WHEN degree BETWEEN 60 and 80 THEN '良好' ELSE '优秀'EN 阅读全文
posted @ 2022-04-08 09:54 狒狒桑 阅读(95) 评论(0) 推荐(0) 编辑
摘要: # time,计算2天前的时间 now_timestamp = time.time()two_day_before = now_timestamp - 60*60*24*2two_days_local = time.localtime(two_day_before) time.strftime('% 阅读全文
posted @ 2022-04-08 09:02 狒狒桑 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1. local用于函数内部局部变量生命 2. 函数定义框架: rand() { } 3. 执行命令语句用 ``括起来 4. [[]] 用于判断条件 5. (()) 用于计算表达式 6. ${line// /..} 将空格替换成2个.. : aaa bb cc -->aaa....bb......c 阅读全文
posted @ 2022-04-07 15:32 狒狒桑 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 云真机:http://testerhome.com/ZhouYixun databus:https://www.bilibili.com/video/BV1gE411M7cs?p=13 http协议、mysql:https://www.bilibili.com/video/BV1WE411p7yH? 阅读全文
posted @ 2022-04-06 16:00 狒狒桑 阅读(32) 评论(0) 推荐(0) 编辑
摘要: (1)按文件类型查找 # find ./ -type d 目录 # find ./ type f 文件 说明: ./ 是查找范围 (2)按文件名查找 # find ./ -name fullname 完整名称 # find ./ -name .*partname.* 把文件都当目录进行匹配,文件按. 阅读全文
posted @ 2022-04-06 11:51 狒狒桑 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 参考:https://blog.csdn.net/boonya/article/details/83012263 (1)压缩 # tar -zcvf testsh/* testsh.tar.gz 将testsh目录下的所有文件压缩到 testsh.tar.gz 中 -z, --gzip格式打包 -c 阅读全文
posted @ 2022-04-06 11:06 狒狒桑 阅读(24) 评论(0) 推荐(0) 编辑
摘要: # top (1) # uptime 当前时间 开机了多长时间 活跃用户数 平均负载:1分钟 5分钟 15分钟 平均负载统计:runnable(运行状态的进程) uninterruptable(不可间断状态的进程) cpu core=1,load average=1 ,利用率1 期望不大于3 cpu 阅读全文
posted @ 2022-04-06 00:23 狒狒桑 阅读(59) 评论(0) 推荐(0) 编辑
摘要: # awk -F : '{print $1}' /etc/passwd | sed ':1;N;s/\n/|/g;t1' ;打印第一列的数据并用|分割替代以前的\n分割 :1 代表打一个标记1 t1 跳转到标记1 N 将读取到的数据追加到模式空间(包含换行符) # sed 's#:x:[0-9]:* 阅读全文
posted @ 2022-04-05 22:51 狒狒桑 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 脚本1: # vi test.sh # !/bin/bash echo $1,$2,$3 echo "文件名" $0 echo "参数变量 "$# echo "all "$* echo "return "$? # bash test.sh 1 2 3 阅读全文
posted @ 2022-04-05 19:01 狒狒桑 阅读(25) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页