Linux Stuff
All My Favourite Linux recipes.
Friday, 4 December 2009
Shell script to list all users in /etc/passwd file
No need for grep. awk does it all.
awk -F":" '$7 ~ /\/bin\/bash/ {print $1}' /etc/passwd
Sukhdev S. Jadhav
Friends are like an treasure,so if you want to become rich in your life make as many friends as possible in the life.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment