Skip to content

Instantly share code, notes, and snippets.

@TJRoger
Created September 14, 2016 07:35
Show Gist options
  • Save TJRoger/92cfea64cb5468485a3be0a96100bddc to your computer and use it in GitHub Desktop.
Save TJRoger/92cfea64cb5468485a3be0a96100bddc to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /home/
if [ $1 ]; then
for d in */ ; do
user=${d%/*}
echo $user;
#ps aux |grep router.php |grep $user |wc -l
ps aux |grep $1 |grep $user |wc -l
done
else
for d in */ ; do
user=${d%/*}
echo $user;
ps aux |grep router.php |grep $user |wc -l
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment