Sponsored Content
Full Discussion: Problem with While Do loop
Top Forums Shell Programming and Scripting Problem with While Do loop Post 302973530 by RudiC on Wednesday 18th of May 2016 11:08:25 AM
Old 05-18-2016
How would you define/compute/detect "similarity"? A case mismatch? A character permutation? substitution? addition?

Do you have any algorithm in mind? Any attempts done so far?
 

10 More Discussions You Might Find Interesting

1. Programming

problem with while loop

hi all, i have written the following code: while(proceed !='Y' && proceed!='N' && proceed!='y' && proceed!='n') { printf("\nPress \n\t 'Y' or 'y' to continue \n\t 'N' or 'n' to cancel:"); scanf("%c",&proceed); } the output i am gettin is: Press 'Y' to continue ... (1 Reply)
Discussion started by: mridula
1 Replies

2. Shell Programming and Scripting

for loop problem

Hi, I have a directory called logs in which i have the log files. i have to touch the file before deleting it. i am doing like this filestodelete="*.log* *log*" for files in $filestodelete do touch $files $files.$(date +%a) rm -f $filestodelete done touch is not working... (5 Replies)
Discussion started by: namishtiwari
5 Replies

3. UNIX for Advanced & Expert Users

loop problem

Hi guys my while do loop is not working properly; As soon as the load_date and run_date is same it should stop can somebody tell me where I am having the problem? In an oracle table I have LOAD_DT=5/1/2009 DATE datatype RUN_DT=5/5/2009 DATE datatype Now in a script with a spool file I get the... (15 Replies)
Discussion started by: henrysmith
15 Replies

4. Shell Programming and Scripting

Problem in While loop

Hi Guys, This is my code.. I am getting an error in the inside while statement when comparing.. I am not able to figure it out.. Pls help me... while read value fatherid son_id top_id r_type do inside_value=1; echo $inside_value; echo $r_type; while do echo... (6 Replies)
Discussion started by: mac4rfree
6 Replies

5. Shell Programming and Scripting

problem with a loop

Hi What is wrong with this loop it was taken has a example in book!!! it returns then /usr/sbin/svcadm disable ppserv else /usr/sbin/ppadmin stop fi } (3 Replies)
Discussion started by: Ex-Capsa
3 Replies

6. Shell Programming and Scripting

problem with while loop

hi I had created a while loop in a script file called whiletest.sh as follows as follows: count=0 max=10 while do echo $count echo count=$(count+1)" " done echo "value of count:$count" then i run the script with the command sh whilestest.sh but its giving me an error... (5 Replies)
Discussion started by: angel12345
5 Replies

7. UNIX for Dummies Questions & Answers

While loop problem

I have a while loop with -f and -o option.Can any one please tell me what that stands for?The Sample code is as follows:- while do ## some processing done (10 Replies)
Discussion started by: Param0073
10 Replies

8. Shell Programming and Scripting

Problem with While loop.

Hi Script Gurus, I am facing issue with while loop in bash. The while loop is running as end less loop even after given criteria does not meet. STATE_BEFORE_SPLIT () { for clone in $Clonegroups; do state=$( $Navicmd -listclone -name $clone -cloneid $Cloneid |awk... (3 Replies)
Discussion started by: RobP
3 Replies

9. Shell Programming and Scripting

Problem with loop within loop

Hi, I work on Ab-initio ETL tool which is based on Unix. I made a small script which has two loop's one with in another. All the functionality is working for the first line of outer loop but when it comes to other lines of outer loop it is throwing error as command not found. Below is the... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

10. Shell Programming and Scripting

Problem with loop

Hi all, a problem with a loop. Imagine it starts with var1="$(cat txtif.out )"while do echo file1 echo file2 echo y > txtif.out if then break fi done exit 0 the problem is that if the file is changing during the loop seems to continue as it reads "x" state,... (5 Replies)
Discussion started by: Board27
5 Replies
SIMHASH(1)						      General Commands Manual							SIMHASH(1)

NAME
simhash - file similarity hash tool SYNOPSIS
simhash [ -s nshingles ] [ -f nfeatures ] [ file ] simhash [ -s nshingles ] [ -f nfeatures ] -w file ... simhash [ -s nshingles ] [ -f nfeatures ] -m file ... simhash -c hashfile hashfile DESCRIPTION
This program is used to compute and compare similarity hashes of files. A similarity hash is a chunk of data that has the property that some distance metric between files is proportional to some distance metric between the hashes. Typically the similarity hash will be much smaller than the file itself. The algorithm used by simhash is Manassas' "shingleprinting" algorithm (see BIBLIOGRAPHY below): take a hash of every m-byte subsequence of the file, and retain the n of these hashes that are numerically smallest. The size of the intersection of the hash sets of two files gives a statistically good estimate of the similarity of the files as a whole. In its default mode, simhash will compute the similarity hash of its file argument (or stdin) and write this hash to its standard output. When invoked with the -w argument (see below), simhash will compute similarity hashes of all of its file arguments in "batch mode". When invoked with the -m argument (see below), simhash will compare all the given files using similarity hashes in "match mode". Finally, when invoked with the -c argument (see below), simhash will report the degree of similarity between two hashes. OPTIONS
-f feature-count When computing a similarity hash, retain at most feature-count significant hashes from the target file. The default is 128 fea- tures. Larger feature counts will give higher resolution in differences between files, will increase the size of the similarity hash proportionally to the feature count, and will increase similarity hash computation time slightly. -s shingle-size When computing a similarity hash, use hashes of samples consisting of shingle-size consecutive bytes drawn from the target file. The default is 8 bytes, the minimum is 4 bytes. Larger shingle sizes will emphasize the differences between files more and will slow the similarity hash computation proportionally to the shingle size. -c hashfile1 hashfile2 Display the distance (normalized to the range 0..1) between the similarity hash stored in hashfile1 and the similarity hash stored in hashfile2. -w file ... Write the similarity hash of each of the file arguments to file.sim. -m file ... Compute the similarity hash of each of the file arguments, and output a similarity matrix for those files. AUTHOR
Bart Massey <bart@cs.pdx.edu> BUGS
This currently uses CRC32 for the hashing. A Rabin Fingerprint should be offered as a slightly slower but more reliable alternative. The shingleprinting algorithm works for text files and fairly well for other sequential filetypes, but does not work well for image files. The latter both are 2D and often undergo odd transformations. BIBLIOGRAPHY
Mark Manasse, Microsoft Research Silicon Valley. Finding similar things quickly in large collections. http://research.micro- soft.com/research/sv/PageTurner/similarity.htm Andrei Z. Broder. On the resemblance and containment of documents. In Compression and Complexity of Sequences (SEQUENCES'97), pages 21-29. IEEE Computer Society, 1998. ftp://ftp.digital.com/pub/DEC/SRC/publications/broder/positano-final-wpnums.pdf Andrei Z. Broder. Some applications of Rabin's fingerprinting method. Published in R. Capocelli, A. De Santis, U. Vaccaro eds., Sequences II: Methods in Communications, Security, and Computer Science, Springer-Verlag, 1993. http://athos.rutgers.edu/~muthu/broder.ps 3 January 2007 SIMHASH(1)
All times are GMT -4. The time now is 04:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy