-
11 年前
Python 多行合并一行 行尾加上换行符'\n'并写入文件
Shell/Python python合并行
原始文件 活动一: 活动名称:每日充值接力 活动二: 活动名称:天天充值接力 脚本处理 #!/usr/bin/python # _*_coding:utf-8 _*_ newfile = [] with open("notice.txt",'rb') as fp: for i in fp.readlines(): i = i.strip() if len…
-
11 年前
-
11 年前
nagios 监控网卡带宽脚本
Shell/Python 运维监控
#!/bin/bash #set nagios status STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 usage (){ echo -en "Usage: $0 -d [ eth|bond ]\nFor example:\t$0 -d bond0 -w 100[B|K|M|G] -c 2…
Linux运维笔记|自动化运维攻城狮

