0

so I used {ps -eo user|sort|uniq -c|sort -n|tail -1} to get the user with most number of processes. However, I get sth like 946 root, but I only want to display the user name and not the number of processes. That is I only want to display root. How should I go about doing this?

1 Answers1

2

Is this what you need?

ps -eo user|sort|uniq -c|sort -n|tail -1|awk '{print $2}'

measley41
  • 36
  • 3