Skip to content

Instantly share code, notes, and snippets.

@king6cong
Last active March 13, 2018 03:11
Show Gist options
  • Save king6cong/b3ec1d2d098472fb418e8d8f89efcad3 to your computer and use it in GitHub Desktop.
Save king6cong/b3ec1d2d098472fb418e8d8f89efcad3 to your computer and use it in GitHub Desktop.
#!/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