Solved

Need help with "sort" command

Posted on 2004-04-01
2
403 Views
Last Modified: 2010-04-21
What would be the sort command if I wanted to sort the file by the last field (the fifth field)?

File sample:

,040606,20040401,            ,123456789,362 |
                                                           ^
                                                            |
                                                            |
                                                     This field
0
Comment
Question by:rlburris
2 Comments
 
LVL 7

Accepted Solution

by:
fim32 earned 250 total points
ID: 10733957
sort -n -t , -k 5

the -n is for numerically
0
 

Author Comment

by:rlburris
ID: 10734038
Thanks... the command was:

sort input.name -n -t, -k 5 -o output.name
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now