I just started taking a linux course and am stuck with my assignment.
I need to find the usernames of logged-in users with usernames of fewer than 8 characters. Here is the command that I have tried but it is not working. Would someone please advise what I may have done incorrectly?
who | grep '[a-zA-Z0-9]\{1,7\}'
The following command here returns 8 character usernames (I have tested and it works)
who | grep '[a-zA-Z0-9]\{8\}'