Linux, programming, computers and life

March 9, 2009

sorting by certain columns in a file

Filed under: CLI, linux

I always knew that ’sort’ command has ‘-k N’ flag which tells to sort based on columns N,…. I just recently find out that this flag is even more versatile, and it can be used as ‘-k N,M’ which will sort based on columns N,…,M. As usuall, it’s in the man page, but i always missed it so far :) .

, ,

1 Comment »

The URI to TrackBack this entry is: http://linux4all.blogsome.com/2009/03/09/sorting-by-certain-columns-in-a-file/trackback/

  1. That’s good to know… in a month or so :)

    I didn’t even know about the -k option

    Comment by gnobal — March 9, 2009 @ 15:06

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Gary Rogers