Profile

Cover photo
bodhi zazen
56 followers|619 views
AboutPostsPhotosVideos

Stream

bodhi zazen

commented on a post on Blogger.
Shared publicly  - 
 
I see this is an old post, but ... awk can do all this for you assuming you go with the default min uid of 1,000 (which is very standard these days) . `awk -F: '!/nobody/ { if ($3 >=1000) { print $1 }}' /etc/passwd`

The !/nobody/ filters out 'nobody' users .

And with complex commands, best to use a function

so ....

lsusers () { awk -F: '!/nobody/ { if ($3 >=1000) { print $1 }}' /etc/passwd; }
alias lsusers='getent passwd | tr ":" " " | awk "\$3 >= $(grep UID_MIN /etc/login.defs | cut -d " " -f 2) { print \$1 }" | sort'   Above command to list non-system users. It should be portable though won't work on systems wit...
1
Add a comment...
Have him in circles
56 people
Jacob Peddicord's profile photo
Luca De Marini's profile photo

bodhi zazen

Discussion  - 
 
Hello Fluxbox =)
2
Add a comment...
People
Have him in circles
56 people
Jacob Peddicord's profile photo
Luca De Marini's profile photo
Basic Information
Gender
Male
Story
Tagline
bodhi.zazen
Apps with Google+ Sign-in