Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Linux / UNIX and the fly likes how do i figure out this one.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how do i figure out this one.. " Watch "how do i figure out this one.. " New topic
Author

how do i figure out this one..

johny walker
Greenhorn

Joined: Nov 23, 2007
Posts: 6
how do i show the last 4 users which entered the system(not last 4 logins)
i tried this
last -4|cut -d" " -f1| uniq -u

but its not working

i was told to
"Do the last command ... send (all) the output to cut and get just the user, send THAT output on to uniq (to get unique values) then send that on to head to get the top 4 entries."

can some one help me to interpret these words to command?? :

about the first part ,do i need only wright "last"
about the second part ,what option to use in the uniq command

and the last one
how do i send that on to head to get the top 4 entries??

i dont know if this is the right way.
i dont care what command will lead to the result


i just want the list of the last 4 users which logged in??

i tried lots of combination that didnt work
please help
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
The way I interpret that is:



but I think you will really want:

Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"google googler",
Please check your private messages.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
johny walker
Greenhorn

Joined: Nov 23, 2007
Posts: 6
thanks alott
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

"google googler", please be sure to check Ben's private message and act accordingly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
johny walker
Greenhorn

Joined: Nov 23, 2007
Posts: 6
thanks
the command worked.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how do i figure out this one..
 
Similar Threads
Increasing Disk Partition Size on Linux
what is the benefit of using the reverse search by pressing CTRL+R?
packages and the classpath update
how do i finish this commmand
Problem to read output from running WGET command