LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 12-02-2004, 03:43 PM   #1
Smsem
LQ Newbie
 
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
Get the sum of accounts id's that have the same group


Hi everybody, I want to use the awk command to get the sum of accounts id's that have the same group ,applying on the /etc/passwd file... So,could you help me
 
Old 12-02-2004, 04:07 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Firstly: welcome to LQ

Secondly: Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

Have you read through man awk?
 
Old 12-03-2004, 03:54 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
what do you mean? If I understand you correctly, it isn't awk that you need. If I remember OK, group is the 3rd field, so to count accounts with group 501, for example:
Code:
grep "^[^:]*:[^:]*:501:" /etc/passwd | wc -l
Yves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to generate report with user id's in SARG jomy Linux - Networking 2 01-04-2011 04:05 AM
Managing user Accounts with Group Policies, LDAP AdamSBS Linux - Software 2 08-24-2005 09:10 PM
email-id's in an domain cyrilvictor Linux - General 1 11-03-2004 08:07 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 05:01 PM
Group ID's and Files JBDM Linux - General 2 04-10-2003 03:50 PM


All times are GMT -5. The time now is 01:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration