Last active
March 13, 2018 03:11
-
-
Save king6cong/b3ec1d2d098472fb418e8d8f89efcad3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo_eval_cmd() { | |
cmd=$1 | |
echo "======" | |
echo "$cmd" | |
echo "======" | |
eval "$cmd" | |
} | |
echo_eval_cmd "curl -s ipinfo.io/ip" | |
echo_eval_cmd "grep 'connection closed via error' ~/Library/Application\ Support/Lark/sdk_storage/log/lark.log | grep V4 | sed 's/.*V4(\([^ ]*\))).*/\1/' | sort -ur" | |
# dns related | |
echo_eval_cmd "dig api.zjurl.cn" | |
echo_eval_cmd "scutil --dns" | |
# mtr | |
# echo_eval_cmd "sudo mtr -r -c1 api.zjurl.cn" | |
echo_eval_cmd "traceroute -n api.zjurl.cn 2>&1 | head -n15" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment