extracting usernames with at least 4 characters

Hi,

i want to use grep to extract users with at least 4 characters in their username, i've tried who | grep \{4,\} but thats not working!!!!!!

Thanks

See the regex usage in this thread - question on egrep

who | awk 'length($1) >=4'

Continuing with your original line of thought...note the spaces...

who | grep "^[^ ]\{4,\} "

Hi,

Thanks that works great.


  1. ^ ↩︎