码迷,mamicode.com
首页 >  
搜索关键字:awk strftime    ( 5235个结果
Shel编程之awk
1. awk工作模式 awk是一个文本处理工具,通常用于处理数据并生成结果报告 awk的命名来自它的创始人 Alfred Aho 、Peter Weinberger 和 Brian Kernighan 姓氏的首个字母 语法格式 awk 'BEGINpatternEND' file standard ...
分类:其他好文   时间:2021-03-16 13:40:15    阅读次数:0
time时间模块
import time'''时间戳'''# time()时间戳,1615279063.568697秒,从1970年1月1日凌晨0点开始计时,可用于做计算print('时间戳:', time.time())'''时间戳转换为结构化时间'''# localtime()结构化时间(当地时间),按顺序是:年 ...
分类:其他好文   时间:2021-03-10 13:05:40    阅读次数:0
参数里时间格式的转换
https://blog.csdn.net/holdlg/article/details/62436537 time.time() 得到浮点型的时间戳 time.localtime() 都得到 struct_time time.strftime() 可以这么理解 “string format tim ...
分类:其他好文   时间:2021-03-06 14:58:28    阅读次数:0
从一个文件读取数据,按行列分析出来
#!/bin/bash #for.sh for i in `cat ./ip.txt`; do ip=`echo $i|awk -F: '{print $1}'` num=`echo $i|awk -F: '{print $2}'` echo $ip sleep 1 echo $num sleep ...
分类:其他好文   时间:2021-03-06 14:46:46    阅读次数:0
多测师肖sir_高级金牌讲师__python之模块time格式输出详解
import timeprint(time.strftime('%Y-%m-%d %H:%M:%S')) # 2021-03-0416:08:44%y 两位数的年份表示(00-99)%Y 四位数的年份表示(000-9999)%m 月份(01-12)%d 月内中的一天(0-31)%H 24小时制小时数 ...
分类:编程语言   时间:2021-03-05 13:24:25    阅读次数:0
常用Python脚本
1.请按照这样的日期格式(xxxx-xx-xx)每日生成一个文件,例如今天生成的文件为2019-04-26.log, 并且把磁盘的使用情况写到到这个文件中。 import time, os new_time = time.strftime("%Y-%m-%d") disk_status = os.p ...
分类:编程语言   时间:2021-03-04 13:27:25    阅读次数:0
nginx服务器中出现过多TIME_WAIT的问题(完善中)
在允许nginx服务器中,输入命令: netstat -ano | grep "TIME_WAIT" 可以看到出现很多TIME_WAIT的端口, 输入命令: netstat -an|awk '/tcp/ {print $6}'|sort|uniq -c 可以看到结果: 76 CLOSE_WAIT 3 ...
分类:其他好文   时间:2021-03-04 13:10:09    阅读次数:0
打印乘法口诀表(shell/sed/awk/python)
shell #! /bin/bash #外层循环 for ((i=1;i<=9;i++)) do #内层循环 for ((j=1;j<=i;j++)) do #计算2个数的乘积 let "product=i*j" #输出乘积 printf "i*i?j=$product" #输出空格分隔符 if [ ...
分类:编程语言   时间:2021-03-03 11:55:14    阅读次数:0
linux命令
cd,pwd,ls,cp,mv,history,ps,top,netstat,grep,tar-cvf/xvf,这些是基本的 touch,cat,head,tail,跟文件相关 vim命令 vi,进入文件页, i,插入 esc,切换插入模式和命令模式,然后:wq,保存后退出 最近重点学习了awk命令 ...
分类:系统相关   时间:2021-03-02 11:57:34    阅读次数:0
?linux基础命令 截取 cut
######cut -d 指定分隔符 -f 指定列数 1,2,3 [root@rongbiz002 26]# awk '{print $1}' /www/wwwlogs/c2p.rongbiz.com-access_log|head -n5 |cut -d '.' -f 1,2,3 112.64.5 ...
分类:系统相关   时间:2021-02-27 13:40:48    阅读次数:0
5235条   上一页 1 ... 3 4 5 6 7 ... 524 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!