Skip to content

Instantly share code, notes, and snippets.

@nevill
Last active November 6, 2021 11:31
Show Gist options
  • Save nevill/7fe9cc7ec1adb3a5df4cce039e86d0c6 to your computer and use it in GitHub Desktop.
Save nevill/7fe9cc7ec1adb3a5df4cce039e86d0c6 to your computer and use it in GitHub Desktop.
Useful shell commands
# 在执行程序10秒后终止
ping 192.168.1.1 & read -t 10 || kill $!
ping 192.168.1.1 & sleep 10s; kill $!
# 计算 pi 2000 位
perl -Mbignum=bpi -wle "print bpi(2000)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment