Profile

Cover photo
bodhi zazen
58 followers|2,677 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
58 people
Daniel Holbach's profile photo
Matthew Lye's profile photo
Josh Mint (Maddeth)'s profile photo
Jacob Peddicord's profile photo
Geoff St. Pierre's profile photo
Drew Smith's profile photo
Jacky Alciné's profile photo
Brahim Jaouane's profile photo
Alok Ranjan's profile photo

bodhi zazen

Discussion  - 
 
Hello Fluxbox =)
2
Add a comment...
People
Have him in circles
58 people
Daniel Holbach's profile photo
Matthew Lye's profile photo
Josh Mint (Maddeth)'s profile photo
Jacob Peddicord's profile photo
Geoff St. Pierre's profile photo
Drew Smith's profile photo
Jacky Alciné's profile photo
Brahim Jaouane's profile photo
Alok Ranjan's profile photo
Basic Information
Gender
Male
Story
Tagline
bodhi.zazen
Apps with Google+ Sign-in