Sponsored Content
Top Forums Shell Programming and Scripting What's UNIX Expert's suggestion for this thread ? Post 302782135 by Akshay Hegde on Monday 18th of March 2013 10:14:55 AM
Old 03-18-2013
Dear Sir here requirement is like this

1. store all file's in one array
2. compare $8 1st field with $8 1st field of other file, if not matching, then that filename should be moved to UNIQUE ID array(delete from main array), if suppose matched then ID is duplicate so duplicate ID should be stored in new array, there can be any number of duplicate ID's

after this I want to access Unique ID file's first
some function
once above 1 completes

then 1st duplicate ID file's array
some function

then 2nd duplicate ID file's in array

3rd duplicate ID file's

4th duplicate ID file's

input file1

Code:
23-Oct-1985    05:36:00    PM    14.982    88.008    255    15    91
23-Oct-1985    05:36:00    PM    14.982    88.008    260    14.9    91
23-Oct-1985    05:36:00    PM    14.982    88.008    265    14.8    91
23-Oct-1985    05:36:00    PM    14.982    88.008    270    14.6    91
23-Oct-1985    05:36:00    PM    14.982    88.008    275    14.5    91

Code:
24-Oct-1985    06:17:00    AM    14    88    0    29.2    108
file 2
24-Oct-1985    06:17:00    AM    14    88    5    29.2    108
24-Oct-1985    06:17:00    AM    14    88    10    29.1    108
24-Oct-1985    06:17:00    AM    14    88    15    29    108
24-Oct-1985    06:17:00    AM    14    88    20    29    108
24-Oct-1985    06:17:00    AM    14    88    25    29    108

file3
Code:
08-Dec-1983    10:28:00    AM    17    84    245    12    50
08-Dec-1983    10:28:00    AM    17    84    250    11.9    50
08-Dec-1983    10:28:00    AM    17    84    255    11.8    50
08-Dec-1983    10:28:00    AM    17    84    260    11.7    50
08-Dec-1983    10:28:00    AM    17    84    265    11.6    50
08-Dec-1983    10:28:00    AM    17    84    270    11.5    50
08-Dec-1983    10:28:00    AM    17    84    275    11.5    50

file 4
Code:
03-Oct-1985    03:00:00    AM    16.183    83.483    0    29.1    50
03-Oct-1985    03:00:00    AM    16.183    83.483    5    29.1    50
03-Oct-1985    03:00:00    AM    16.183    83.483    10    29.1    50
03-Oct-1985    03:00:00    AM    16.183    83.483    15    29.4    50
03-Oct-1985    03:00:00    AM    16.183    83.483    20    29.3    50
03-Oct-1985    03:00:00    AM    16.183    83.483    25    29.2    50
03-Oct-1985    03:00:00    AM    16.183    83.483    30    29    50

 

8 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Suggestion for unix.com

I am relatively new here ...but I had a suggestion. The first time I visited this site I tried to go to unix.com and it did not go anywhere I then said ok let try www.unix.com. I think that it would be a good pratice to change the zone file file so that when you go to unix.com it comes here as... (5 Replies)
Discussion started by: gennaro
5 Replies

2. UNIX for Dummies Questions & Answers

Suggestion: Alternative OS for Windows - Totally Clueless on Unix/Linux OS

Can anyone tell me a good alternative to Windows? OS that can connect to a Windows domain and use for everyday (can use with Oracle). Easy to learn. (4 Replies)
Discussion started by: genesisX
4 Replies

3. Post Here to Contact Site Administrators and Moderators

Re: Suggestion to ease navigation .... thread

This post should be an edit of the post I just made to start the "Suggestion to ease navigation ..." thread, but my original post is not visible to edit, since it's waiting for moderator approval ... Additional text I wanted to add to my original post: The title of the The UNIX and Linux... (2 Replies)
Discussion started by: usnay12345
2 Replies

4. UNIX for Advanced & Expert Users

Suggestion Required for UNIX career

Hi, I am having experience on Perl and C# and worked as Windows Sytem Admin and now iam planning to become a UNIX developer. I am having knowledge on basic UNIX.. can any one suggest me any good material for c/c++ UNIX programming. on what all things a UNIX Programmer needs to... (1 Reply)
Discussion started by: chandrareddy1
1 Replies

5. UNIX for Dummies Questions & Answers

Need a suggestion on UNIX Books

Hi All, Request you to suggest any other book as of year 2013. The below thread is of year 2000 and I have not found the books mentioned in the link below. Which Unix Certification is the most needed these days? Or please share any updated thread is there on this. Thanks and regards,... (7 Replies)
Discussion started by: saps19
7 Replies

6. Post Here to Contact Site Administrators and Moderators

Didn't find a suggestion thread

An 'addition' to the "Homework & Classes" requirements.. As i am someone without paper, i just figured i got tempred reading such a question. To avoid such 'feelings' in future, i'd be thankfull if the 'kind & definition of the course' would be required too. As in (i dont know about proper... (2 Replies)
Discussion started by: sea
2 Replies

7. Cybersecurity

Looking for suggestion on authentication method for UNIX/Windows

Hello, We have mid level infrastructure of all on-premises servers. All windows servers are getting authenticated by Microsoft Active Directory Services, half Unix (Solaris+Linux) servers are getting authentication by NIS and other half by LDAP. We have plans to migrate from NIS to LDAP, so... (2 Replies)
Discussion started by: solaris_1977
2 Replies

8. What is on Your Mind?

Any Google SEO Expert to Help UNIX.COM?

I checked (again) and it seems like we lost 70% of our Google indexed links starting in March 2018. So far, I do not know what caused this drop: https://www.unix.com/members/1-albums215-picture904.png As mentioned, I have done a lot of checking, and we did not make any changes in March of... (2 Replies)
Discussion started by: Neo
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 06:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy