The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Is awk vs cut which one is better
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Is awk vs cut which one is better
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
11-22-2007
gus2000
Registered User
Join Date: Oct 2007
Posts: 157
I love one-line commands.
Code:
(last | awk '{print$1}'; awk -F: '{print$1}' /etc/passwd) | sort | uniq -u
The command "uniq -u" show only
unrepeated
lines, which would be "users in passwd but NOT in wtmp".
gus2000
View Public Profile
Find all posts by gus2000
Find gus2000's past nominations received
Find gus2000's present nominations given