The FreeBSD Diary
(TM)
Providing practical examples since 1998
If you buy from Amazon USA, please support us by using
this link
.
[
HOME
|
TOPICS
|
INDEX
|
WEB RESOURCES
|
BOOKS
|
CONTRIBUTE
|
SEARCH
|
FEEDBACK
|
FAQ
|
FORUMS
]
Article Feedback -
Want a list of users on your box?
New Topic
|
Go to Top
|
Go to Topic
|
Search
|
Log In
Newer Topic
|
Older Topic
using awk
Author: Peter Chiu
Date: 28-10-01 18:39
(written by Peter Chiu but posted by Dan Langille)
another solution is:-
awk -F: '! /^#/ { print $1 }' /etc/passwd
-F: use colon as separator
! /^#/ not beginning with a #
print $1 print first field
Reply To This Message
Forum List
|
Threaded View
Newer Topic
|
Older Topic
Forum List
|
Need a Login? Register Here
User Login
User Name:
Password:
Remember my login:
Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum