Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

Need help with "sort" command

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
rlburris
Asked:
rlburris
1 Solution
 
fim32Commented:
sort -n -t , -k 5

the -n is for numerically
0
 
rlburrisAuthor Commented:
Thanks... the command was:

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now