摘要:
#!/bin/bash for i in `seq 1 254` do ping -c 1 192.168.72.$i > /dev/null if [ $? -eq 0 ] then echo: "192.168.72.$i存活" else echo: "192.168.72.$i不存活" fi 阅读全文
posted @ 2020-08-25 17:34
xiongmengdecrocodile
阅读(120)
评论(0)
推荐(0)
摘要:
https://www.runoob.com/python/python-files-io.html 阅读全文
posted @ 2020-08-25 16:56
xiongmengdecrocodile
阅读(108)
评论(0)
推荐(0)
摘要:
.py(读取文件): # 1. 打开文件 file = open("readme.txt") # 文件不存在会抛异常. 默认以只读方式打开 # with open("readme.txt") as file: # 这种方式,会自动close()释放资源 # 2. 读取文件内容 text = file 阅读全文
posted @ 2020-08-25 14:56
xiongmengdecrocodile
阅读(114)
评论(0)
推荐(0)