摘要: refer to: https://www.debian.org/doc/manuals/debian-handbook/sect.syslog.en.html 日志子系统 Each log message is associated with an application subsystem (c 阅读全文
posted @ 2022-11-09 15:38 武平宁 阅读(297) 评论(0) 推荐(0)
摘要: logging #!/bin/bash # a small tool for logging sommething # # 1. read your input # 2. save to logs file >> ~/logs/$(date +%F) # # if command like: log 阅读全文
posted @ 2022-11-09 10:45 武平宁 阅读(42) 评论(0) 推荐(0)
摘要: #!/bin/bash ips=( 1.1.1.2 1.1.1.1 ) port= user= passwd= for i in ${ips[@]} do echo "== $i ==" sshpass -p "$passwd" ssh -p $port $user@$i "$@" done 阅读全文
posted @ 2022-11-09 10:44 武平宁 阅读(16) 评论(0) 推荐(0)
摘要: #!/usr/bin/expect if {$argc != 1} { puts "usage: ./telnet2sswitch <r2|r3>" exit } if {"[lindex $argv 0]" == "r0"} {set ip 192.168.130.10 } if {"[linde 阅读全文
posted @ 2022-11-09 10:38 武平宁 阅读(28) 评论(0) 推荐(0)