The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sort file alphabetically AND numerically mrodrig UNIX for Dummies Questions & Answers 2 05-19-2008 10:46 AM
Sort a file line by line alphabetically H2OBoodle Shell Programming and Scripting 11 02-11-2008 07:27 AM
How to sort decimal values in bash ahjiefreak Shell Programming and Scripting 1 01-21-2008 09:25 AM
finding specific values in a within a file Gerry405 UNIX for Dummies Questions & Answers 3 11-21-2005 11:37 AM
How to Sort files based on predefined values.? p_prathaban Shell Programming and Scripting 2 02-17-2004 11:39 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-27-2008
doubleminus doubleminus is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 27
How to sort alphabetically after finding values

I have a list of people in a usage log and need to print the names and phone numbers of people with over 500 logins. I'd also like to display these names alphabetically.

I have their total logins set to a variable named total.

So far, I have very little in my awk script to do this:

FS=":"
{if ( total > 500 ) print $1, $2}

($1 being both first and last name, $2 being phone number)

There is more to the script than this, but above is the relevant portion.

This only prints one of their names unfortunately, even though my data file clearly has others with totals > 500.

Any advice or pointers here? Thanks!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0