Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

June 28 2013

Linux command – sort text file by specific column

“sort” command can specific column (“-k”) and delimiter (“-t”). Also, it can use “-n” option to specific numeric-sort.

For example:

> cat t
New,1390476,1,09:00:25,1,AAA05
New,530957,1,09:00:25,1,AAA07
New,701097,1,09:00:30,1,AAA09
New,629508,1,09:00:34,1,AAA11
New,500058,1,10:00:30,1,AAA12
New,682789,1,09:00:32,1,AAA13
New,562234,1,09:00:32,1,AAA14
New,618184,1,11:00:32,1,AAA15
New,816919,1,09:00:35,1,AAA16
New,515249,1,09:00:35,1,AAA17


> sort -k4 -t"," t
New,1390476,1,09:00:25,1,AAA05
New,530957,1,09:00:25,1,AAA07
New,701097,1,09:00:30,1,AAA09
New,682789,1,09:00:32,1,AAA13
New,562234,1,09:00:32,1,AAA14
New,629508,1,09:00:34,1,AAA11
New,816919,1,09:00:35,1,AAA16
New,515249,1,09:00:35,1,AAA17
New,500058,1,10:00:30,1,AAA12
New,618184,1,11:00:32,1,AAA15

source : http://stackoverflow.com/questions/1037365/unix-sort-with-tab-delimiter


June 01 2013

Linux command – list all network connections

How to list all network connections (including which app they belong to)?

lsof -i -nP

refer : http://theprofessionalspoint.blogspot.in/2013/05/10-interesting-unix-commands-you-should.html


Tags: linux
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl