Unix count users logged in

I need to count the 10 users that have logged into the system fewer times over the last month. (ordered from lowest to highest)
axturAsked:
Who is Participating?
 
omarfaridConnect With a Mentor Commented:
Hi,

axtur:


last | grep -v wtmp | awk '{print $1}' | sort | uniq -c | sort > /tmp/u.$$
c=`wc -l < /tmp/u.$$`
c=`expr $c - 1`
tail -$c /tmp/u.$$ | head -10
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.