How can i create a script to count process run by each user in ps aux
. I used this
ps aux | awk '{print $1}' | grep root | wc -l
but it lists count of root user only . I want to list number of process for each user. I need something like this:
root 20
jamshi 15