Sponsored Content
Top Forums UNIX for Dummies Questions & Answers diff on compressed files with tar.gz ext Post 302136785 by porter on Wednesday 19th of September 2007 05:17:28 PM
Old 09-19-2007
Quote:
Originally Posted by rakeshou
how can I find out what is the difference between two tar.gz files without uncompressing them.

thank you.
You can't. At some point you have to decompress them.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

diff 2 files; output diff's to 3rd file

Hello, I want to compare two files. All records in file 2 that are not in file 1 should be output to file 3. For example: file 1 123 1234 123456 file 2 123 2345 23456 file 3 should have 2345 23456 I have looked at diff, bdiff, cmp, comm, diff3 without any luck! (2 Replies)
Discussion started by: blt123
2 Replies

2. UNIX for Dummies Questions & Answers

How to delete files with certain ext?

Hi All, How can I work on following request? Delete all the html files older than 29th November from the path - /dding/ting/tong/unixyang/output (4 Replies)
Discussion started by: tonyvirk
4 Replies

3. UNIX and Linux Applications

Update compressed archive (TAR)

Is it possible to update a file in a compressed archive.tgz using the tar app without uncompressing/extracting, update and compressing/creating ? tar -uvzf archive.tgz ./file.txt tar: Cannot update compressed archives Try `tar --help' for more information. (1 Reply)
Discussion started by: brendan76
1 Replies

4. UNIX for Dummies Questions & Answers

Count number of compressed files in a tar.gz archive

Hi Folks, I have a tar.gz compressed file with me, and I want to know the number of files in the archive without uncompressing it. Please let me know how I can achieve it. Regards RK Veluvali (5 Replies)
Discussion started by: vrk1219
5 Replies

5. Shell Programming and Scripting

Find all tar and compressed file

Hi, I'm trying to find all tar and compressed files (say gzip). I'm having to assume that the tar and gzip files may or may not have the correct extension (.tar .gz .tgz etc). Any help appreciated (2 Replies)
Discussion started by: andyatit
2 Replies

6. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

7. Shell Programming and Scripting

Duplicate name diff file ext

Hi All I have converted a load of files to different formats but I am now left with a folder with loads of differnt files All of them are called the same, the only differnce is the file extension (Sizes also vary so cannot do anything with MD5) example file1.abc file1.xyz file2.abc... (2 Replies)
Discussion started by: tofa83
2 Replies

8. Shell Programming and Scripting

Recursively *.ext files using find

HI, Getting the syntax error " find: missing conjunction" for the below code D1_DIR=/x/y/z D1_NAME=file_name FILE_DIR=pset for file in `find ${D1_DIR}/${D1_NAME} -name "*\.${FILE_DIR}" /dev/null {} \;` do echo $file done #Trying to find all the files with *.pset... (5 Replies)
Discussion started by: cvsanthosh
5 Replies

9. UNIX for Dummies Questions & Answers

compressed and tar file integrity

How can I ensure the folder that I tar and compress is good to be archive in DVD or tape? Must I uncompress and untar the file, or there is any way to tell the integerity of the compressed file before send to archive? I have bad experience on this, which the archive compressed file cold not be... (2 Replies)
Discussion started by: vivien_chu
2 Replies

10. Shell Programming and Scripting

Diff 3 files, but diff only their 2nd column

Guys i have 3 files, but i want to compare and diff only the 2nd column path=`/home/whois/doms` for i in `cat domain.tx` do whois $i| sed -n '/Registry Registrant ID:/,/Registrant Email:/p' > $path/$i.registrant whois $i| sed -n '/Registry Admin ID:/,/Admin Email:/p' > $path/$i.admin... (10 Replies)
Discussion started by: kenshinhimura
10 Replies
math::fuzzy(n)							 Tcl Math Library						    math::fuzzy(n)

__________________________________________________________________________________________________________________________________________________

NAME
math::fuzzy - Fuzzy comparison of floating-point numbers SYNOPSIS
package require Tcl ?8.3? package require math::fuzzy ?0.2? ::math::fuzzy::teq value1 value2 ::math::fuzzy::tne value1 value2 ::math::fuzzy::tge value1 value2 ::math::fuzzy::tle value1 value2 ::math::fuzzy::tlt value1 value2 ::math::fuzzy::tgt value1 value2 ::math::fuzzy::tfloor value ::math::fuzzy::tceil value ::math::fuzzy::tround value ::math::fuzzy::troundn value ndigits _________________________________________________________________ DESCRIPTION
The package Fuzzy is meant to solve common problems with floating-point numbers in a systematic way: o Comparing two numbers that are "supposed" to be identical, like 1.0 and 2.1/(1.2+0.9) is not guaranteed to give the intuitive result. o Rounding a number that is halfway two integer numbers can cause strange errors, like int(100.0*2.8) != 28 but 27 The Fuzzy package is meant to help sorting out this type of problems by defining "fuzzy" comparison procedures for floating-point numbers. It does so by allowing for a small margin that is determined automatically - the margin is three times the "epsilon" value, that is three times the smallest number eps such that 1.0 and 1.0+$eps canbe distinguished. In Tcl, which uses double precision floating-point numbers, this is typically 1.1e-16. PROCEDURES
Effectively the package provides the following procedures: ::math::fuzzy::teq value1 value2 Compares two floating-point numbers and returns 1 if their values fall within a small range. Otherwise it returns 0. ::math::fuzzy::tne value1 value2 Returns the negation, that is, if the difference is larger than the margin, it returns 1. ::math::fuzzy::tge value1 value2 Compares two floating-point numbers and returns 1 if their values either fall within a small range or if the first number is larger than the second. Otherwise it returns 0. ::math::fuzzy::tle value1 value2 Returns 1 if the two numbers are equal according to [teq] or if the first is smaller than the second. ::math::fuzzy::tlt value1 value2 Returns the opposite of [tge]. ::math::fuzzy::tgt value1 value2 Returns the opposite of [tle]. ::math::fuzzy::tfloor value Returns the integer number that is lower or equal to the given floating-point number, within a well-defined tolerance. ::math::fuzzy::tceil value Returns the integer number that is greater or equal to the given floating-point number, within a well-defined tolerance. ::math::fuzzy::tround value Rounds the floating-point number off. ::math::fuzzy::troundn value ndigits Rounds the floating-point number off to the specified number of decimals (Pro memorie). Usage: if { [teq $x $y] } { puts "x == y" } if { [tne $x $y] } { puts "x != y" } if { [tge $x $y] } { puts "x >= y" } if { [tgt $x $y] } { puts "x > y" } if { [tlt $x $y] } { puts "x < y" } if { [tle $x $y] } { puts "x <= y" } set fx [tfloor $x] set fc [tceil $x] set rounded [tround $x] set roundn [troundn $x $nodigits] TEST CASES
The problems that can occur with floating-point numbers are illustrated by the test cases in the file "fuzzy.test": o Several test case use the ordinary comparisons, and they fail invariably to produce understandable results o One test case uses [expr] without braces ({ and }). It too fails. The conclusion from this is that any expression should be surrounded by braces, because otherwise very awkward things can happen if you need accuracy. Furthermore, accuracy and understandable results are enhanced by using these "tolerant" or fuzzy comparisons. Note that besides the Tcl-only package, there is also a C-based version. REFERENCES
Original implementation in Fortran by dr. H.D. Knoble (Penn State University). P. E. Hagerty, "More on Fuzzy Floor and Ceiling," APL QUOTE QUAD 8(4):20-24, June 1978. Note that TFLOOR=FL5 took five years of refereed evolution (publication). L. M. Breed, "Definitions for Fuzzy Floor and Ceiling", APL QUOTE QUAD 8(3):16-23, March 1978. D. Knuth, Art of Computer Programming, Vol. 1, Problem 1.2.4-5. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: fuzzy of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
floating-point, math, rounding CATEGORY
Mathematics math 0.2 math::fuzzy(n)
All times are GMT -4. The time now is 06:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy