Shell

搬砖常用shell片段

1163 words
列出当前监听的所有端口 sudo lsof -Pn -i4 | grep LISTEN 并发执行shell $ cat command_groups.sh #!/bin/sh command() { echo $1 start sleep $(( $1 & 03 )) # keep the seconds value within 0-3 echo $1 complete } echo First Group: command 1 & command 2 & command 3 & wait echo Second Group: command