rm -f link.log #remove the old link.log file.the original link data stored in the file link.log file.
[备份]ddn link 巡检脚本备份。
原创
©著作权归作者所有:来自51CTO博客作者litsand的原创作品,请联系作者获取转载授权,否则将追究法律责任
rm -f link #remove the old link file.the result data file.
wget ftp://134.98.43.53/f:/ddn/link.log # download the newer file link.log
egrep '^N[1,2,7]C|^D[1-4]N[1,2,7]C' link.log >>link #get the line that present the link status.
egrep -c '^N[1,2,7]C|^D[1-4]N[1,2,7]C' link.log >>link # get the numbet of the link.
egrep -v 'ACT/UP' link >>link # get the link that does not act/up
awk 'length($1)<6{print $10} length($1)>6{print $9}' link >>link #get the data that present the usage of the link.
ls -l link.log >>link
grep 'Last login' link.log>>link
gedit link
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
MySQL 8自动备份脚本密码安全警告
作者:田逸(formyz)目标需求接到一个任务,需要在凌晨四点对一个数据库进行备
mysql v8 MySQL -
Rman备份等级及备份脚本
总结一下oracle备份等级之间的差别以及收集一些备份脚本
Oracle 增量备份 累积备份