2
votes
3answers
45 views

Get the last minute dated lines from list

If I have an input file with a list of users and their dates they were last signed in, how can I select with a sort | awk function the last minute lines? The dates are written in a +%H:%M:%S format. ...
6
votes
1answer
120 views

How to specify additional parameters for GNU sort's --compress-program option?

sort --compress-program=/bin/gzip works fine, but how can I pass options down to the compression programm (e.g. --best or --fast)? sort --compress-program=/bin/gzip\ --best failes with the error ...
2
votes
7answers
327 views

Sort the files in the directory recursively based on last modified date

Sort the files in the directory recursively based on last modified date I have modified a lot of files in my directory want to know what are those files by sorting them by the last modified date ...
2
votes
1answer
900 views

Sort data in descending order of first column, for equal values, use second column in ascending order

Allow me to clarify: Assume I have some keywords with frequency of their usage: 12 Hi 7 Hash 7 C++ 9 Superuser 17 Stackoverflow 9 LaTeX 42 Life 9 Ubuntu What I want, is to sort this data ...
2
votes
3answers
25 views

Move line from output to the front of output or custom reordering

I have a command find "$PWD" -name __openerp__.py|awk -F/ -vOFS=/ 'NF-=2'|sort -u and I want to take a certain line containing /web/addons and push it to the front of output then do the same with ...
1
vote
1answer
939 views

How to match 2 large file and print the difference in shell script

I have 2 files. File1 has 400k numerical records. e.g: 1 2 3 4 5 6 .. and so on File 2 also has 420k numerical records. e.g: 1 2 3 4 6 .. and so on Both these file are in unsorted manner. I want ...
3
votes
1answer
1k views

File size limit exceeded in bash [closed]

I have tried this shell script on a SUSE 10 server, kernel 2.6.16.60, ext3 filesystem. The script has a line like this: cat file | awk '{print $1" "$2" "$3}' | sort -n > result The file's size ...
1
vote
3answers
211 views

Numerically sorting files [duplicate]

Possible Duplicate: List files sorted numerically How can I sort this according to the number of last field? I tried with sort -t ' ' -k9,10n: -rw-r--r-- 1 root root 440 May 14 08:52 ...
4
votes
1answer
686 views

Linux sort second last column

I would like know how to sort the second last column ? It has the word "days=" in front of the number. I'm able to get the column with awk '{print $(NF-1)}', but sorting is wrong. 457000 ...
11
votes
4answers
9k views

Sorting the output of “find”?

I need to be able to alphabetically sort the output of find before piping it to a command. Entering | sort | between didn't work, so what could I do? find folder1 folder2 -name "*.txt" -print0 | ...
3
votes
1answer
2k views

Linux sort last column

I'm running a script (that I have no control of) to get the following output. I want to sort by the last(3rd) column. Each column is separate by spaces, and the 2nd column includes spaces/symbols. ...
2
votes
2answers
2k views

Issues of using sort and comm

I was trying to find the intersection of two plain data files, and found from a previous post that it can be done through comm -12 <(sort test1.list) < (sort test2.list) It seems to me that ...
3
votes
2answers
2k views

Sorting by date

Original: Jan 23 2011 10:42 SOMETHING 2007.12.20.avi Jun 26 2009 SOMETHING 2009.06.25.avi Feb 12 2010 SOMETHING 2010.02.11.avi Jan 29 2011 09:17 SOMETHING 2011.01.27.avi Feb 11 2011 20:06 SOMETHING ...