by mr_o47 on 11/2/23, 2:16 AM with 1 comments
by chasil on 11/2/23, 3:14 PM
Here is my shell function to search for processes using shell patterns (these are not regular expressions):
pps () { local a= b= c= IFS=$'\0'; ps ax | while read -r a
do [ "$b" ] || c=1; for b; do case "$a" in *"$b"*) c=1;;
esac; done; [ "$c" ] && printf '%s\n' "$a" && c=; done; }
I have a fancy wrapper for .netrc password storage with SFTP, which is a little more extreme, if there is any interest.