Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

korn shell script parsing help!

Status
Not open for further replies.

jfong716

Technical User
Jun 27, 2002
4
US
i am having a little trouble

i have a text file formatted like

tged, 13
tgea, 28
etc...

i want my end file to look like
tged
tgea

with the end file having only occurrences of 3 or higher of the first column, which is the username..how do i do this?
 
If "occurrences of 3 or higher" means that the second field is >= 3 then this awk program should do what you want.
Code:
awk 'BEGIN {FS=","} $2>2{print $1}' text-file > new-file
CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top