Sponsored Content
Full Discussion: Sort problem!
Top Forums UNIX for Dummies Questions & Answers Sort problem! Post 302833007 by snjksh on Tuesday 16th of July 2013 05:45:12 AM
Old 07-16-2013
uniq numbers with sorting

If you want uniq numbers with sorting

Code:
cat file |sort|uniq


Last edited by radoulov; 07-16-2013 at 06:51 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem with sort

I am attempting to sort a file using the following command: sort +0 -t"|" infilename > outfilename I am getting the following error: sort: 0653-657 A write error occurred while sorting. The file size is 15036274 bytes This is an AIX 5.2 version I believe this is a problem with the... (1 Reply)
Discussion started by: jyoung
1 Replies

2. UNIX for Dummies Questions & Answers

SORT problem on SUN

Hello, I tried to sort on column2 followed by column1 and notice how the "updated" value in column1 is not sorted correctly! Can you tell me if i have the sort statement setup correctly please, thanks much! sort -t "|" -k2 -k1 sortin > sortout ... (2 Replies)
Discussion started by: bobk544
2 Replies

3. Shell Programming and Scripting

how to use awk to sort this problem out

there has several numbers which are:1,2,3,45,6,7,8,9,0,10,34,34,54,122,6756,54,87,99,2,1,45; how to write a shell script orts the above numbers into descending order and puts them into and arrray and also find and prints the minimum and maximum of those numbers, and finds and prints the average... (4 Replies)
Discussion started by: sonicstage
4 Replies

4. Shell Programming and Scripting

sort problem

I have file (srv_lst) with the contents as ... 9.2 IRMD115 8.1 IRMD115 and I am using the sort as to get the bigger version as : sort -r -u +1 $srv_lst | sort -k 1,1r and the output is 9.2 which is good .. if I have the contents of file srv_lst as : 9.2 IRMD115 10.2 IRMD115 ... (4 Replies)
Discussion started by: talashil
4 Replies

5. AIX

sort and dedup problem

I have a file with contents: 1|4|oho hosfadu| 1|3|sdfsd fds| 2|2|sdfg| 2|1|sdf a| 3|5|ouhuh hu| I would like to do three things to it; 1- first, sort it on the first two fields 2- get a unique count on the first field 3- and write the first two unique rows (uniqueness based off the... (4 Replies)
Discussion started by: ChicagoBlues
4 Replies

6. Programming

sort problem

I am in need of some direction. First off I want to admit this is an assignment but I have hit a block. I need to sort, by the number of times a string occurs (count), and output the top 10. I have found what number gives me the top 10 so from there I need to know how to sort them. Any... (1 Reply)
Discussion started by: Cn00b
1 Replies

7. UNIX for Dummies Questions & Answers

Problem with sort-of array in SH

Hello to everyone! I'm really new in shell scripting and I'm experiencing a very odd problem. This is my first post in this forum, hope you can help! I know that declaring arrays in Bourne Shell is impossible. But this is where I start having problems - system administrator did not install... (8 Replies)
Discussion started by: onstock
8 Replies

8. Shell Programming and Scripting

problem with sort

Hi all, i want to sort by the (1-8) columns and (9-7) columns: my file: MARTINEZ---PAUL --DUPOND---EDDY --DURANDJACQUES --DUPOND--ALAIN output: --DUPOND--ALAIN --DUPOND---EDDY --DURANDJACQUES MARTINEZ---PAUL (6 Replies)
Discussion started by: saw7
6 Replies

9. UNIX for Advanced & Expert Users

Problem with sort +4

Apologies if this should be in 'unix for dummies' thread.. I have a large file containing records like this: 16 Feb 02:49 s_A123_ctas_log.20100216024000.bin 26 Feb 02:55 s_B123_ctas_log.20100226024000.bin 05 Mar 05:22 s_A127_ctas_log.20100305024000.bin I want to sort it by column 4... (2 Replies)
Discussion started by: Grueben
2 Replies
bup-margin(1)						      General Commands Manual						     bup-margin(1)

NAME
bup-margin - figure out your deduplication safety margin SYNOPSIS
bup margin [options...] DESCRIPTION
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids. For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by its first 46 bits. The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits, that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits with far fewer objects. If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if you're getting dangerously close to 160 bits. OPTIONS
--predict Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer from the guess. This is potentially useful for tuning an interpolation search algorithm. --ignore-midx don't use .midx files, use only .idx files. This is only really useful when used with --predict. EXAMPLE
$ bup margin Reading indexes: 100.00% (1612581/1612581), done. 40 40 matching prefix bits 1.94 bits per doubling 120 bits (61.86 doublings) remaining 4.19338e+18 times larger is possible Everyone on earth could have 625878182 data sets like yours, all in one repository, and we would expect 1 object collision. $ bup margin --predict PackIdxList: using 1 index. Reading indexes: 100.00% (1612581/1612581), done. 915 of 1612581 (0.057%) SEE ALSO
bup-midx(1), bup-save(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-margin(1)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy