my.zsh/lib/utils.zsh

13 lines
235 B
Bash

pid_for() {
echo $(ss -lptn "sport = :$1")
echo "---------\n"
echo $(netstat -nlp | grep ":$1")
echo "---------\n"
echo $(lsof -n -i ":$1" | grep LISTEN)
}
intersect_files() {
comm -23 <(sort $1) <(sort $2)
}