Go Back   The UNIX and Linux Forums > Operating Systems > Linux


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-22-2012
Registered User
 
Join Date: Feb 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Network sort command in centos unix

Iam working in centos linux operating system.
Consider the following file by name emp
1008 Vijay 40
1009 Rekha 34
1010 Shreyas 40
1011 Sanjay 40
sort command is not working. I gave sort emp
The command is not working
Can somebody send the options under centos linux
Sponsored Links
    #2  
Old 02-22-2012
rangarasan's Avatar
Registered User
 
Join Date: Jul 2011
Location: Chennai, India
Posts: 484
Thanks: 9
Thanked 119 Times in 115 Posts
sort

Quote:
Originally Posted by jpachar View Post
Iam working in centos linux operating system.
Consider the following file by name emp
1008 Vijay 40
1009 Rekha 34
1010 Shreyas 40
1011 Sanjay 40
sort command is not working. I gave sort emp
The command is not working
Can somebody send the options under centos linux
Hi,

What is your sort constraints ?
I assume that, you are going to sort by name (second column).

Code:
sort -k 2 emp

if you use just
Code:
 sort emp

it will sort with first column by default.

Cheers,
Ranga
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
New to Unix command line and have a question about the "sort" command budfoxcat UNIX for Dummies Questions & Answers 1 11-28-2011 12:46 AM
Sort command using unix koneru_18 UNIX for Advanced & Expert Users 1 10-24-2011 11:14 PM
UNIX sort command numele UNIX for Dummies Questions & Answers 2 04-27-2010 05:27 PM
using Unix sort command phil_heath UNIX for Dummies Questions & Answers 2 10-17-2009 04:00 PM
File size limitation of unix sort command. cskumar Shell Programming and Scripting 7 10-07-2005 10:37 AM



All times are GMT -4. The time now is 05:26 PM.