Re: Sorting only certain data in file.
From: Greg Beeker (gbeeker_at_gmail.com)
Date: 02/16/05
- Next message: Rob: "Re: pkill with boolean logic"
- Previous message: Henrik Grindal Bakken: "Re: Problem with tilde expansion in newer bash shells"
- In reply to: TB: "Sorting only certain data in file."
- Next in thread: John L: "Re: Sorting only certain data in file."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Feb 2005 05:12:04 -0800
TB wrote:
> I have a text file that has a lot of data in it that I need to sort.
I
> have an application that has a command similar to `who` that shows
all
> the users that are logged into the app. Every hour I have a script
> that gets the hostname, date, and the users. Unfortunately the
command
> doesn't sort the users how I would like. What i would like is to
sort
> by the users so that I can see multiple logins. Or better yet, show
> only the duplicate logins (in full so that I can see how many times
> they are logged in).
>
I'd suggest you add a sort command in the script that generates this
file.
Like this:
hostname
date
users | sort
Where 'users' is the command that generates the user list. By the way,
the users command actually will show the users on your system.
- Next message: Rob: "Re: pkill with boolean logic"
- Previous message: Henrik Grindal Bakken: "Re: Problem with tilde expansion in newer bash shells"
- In reply to: TB: "Sorting only certain data in file."
- Next in thread: John L: "Re: Sorting only certain data in file."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|