my.zsh/lib/utils.zsh

13 lines
233 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 <(cat $1) <(cat $2)
}