[TriLUG] possible awk/grep question

Joseph Mack NA3T jmack at wm7d.net
Sun Dec 30 18:12:08 EST 2007


I need to find all "users" on a machine.

It occurs to me that I could find this by looking for all 
lines in /etc/passwd that have "100" in the 4th field, but I 
don't know how to do that in bash/awk/grep, at least not in 
a small number of lines. If I can do that, then I have other 
uses for a script that can find all lines that match in a 
certain field. Anyone know how to do that?

Failing that, anyone know how to find the members of a group 
(eg users) by any method?

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list