LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2015, 12:23 AM   #1
kumar23kan
LQ Newbie
 
Registered: Oct 2015
Posts: 7

Rep: Reputation: Disabled
need to sort based on a particular column


Hai
I am trying to sort based on the first column with only one uniq line. the columns are separated by tabs.

My data file looks like this

R 2.66
F 22.6
G 55.8
R 2.355
R 2.555
R 2.555
H 456
D piii
F giii
G j4p

and i want something like this
D piii
F 22.6
G 55.8
H 456
R 2.355

can some help me out with this.
thanks
 
Old 11-06-2015, 01:02 AM   #2
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 849

Rep: Reputation: 201Reputation: 201Reputation: 201
Simplest options found if you go through the manual will do.

Do try instead of waiting for a response.

OK
 
Old 11-06-2015, 01:03 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,952

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Code:
man sort
man uniq
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spreadsheet question find value for column b based on max value in column k davholla General 2 02-28-2014 04:50 AM
sort third column casperdaghost Linux - Newbie 2 01-19-2013 04:24 PM
[SOLVED] Faster bash sort based on column number akeka Programming 13 05-15-2012 03:48 PM
how to sort the 2nd column on the basis of first column without repeating the value ? zediok Linux - Newbie 15 12-20-2011 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration