Sponsored Content
Full Discussion: compare update time of files
Top Forums UNIX for Dummies Questions & Answers compare update time of files Post 36297 by yeheyaansari on Tuesday 27th of May 2003 08:06:47 AM
Old 05-27-2003
From whcih time you want to compare the update time?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

compare files acess time

I need to compare x file with y file. If x file is newer than y file do xxxx; (I used touch -t yymmddxxx to chnage the time for y file) How can i do that? I tried use if then echo "Xxx";; fi But cant....any other good ways to do it? (2 Replies)
Discussion started by: AkumaTay
2 Replies

2. Shell Programming and Scripting

How to compare data in two flat files and update them?

Hi All, I am giving an example similar to the problem I have. I have two data files of 10 columns each in which fields are delimited by comma(,). I need to compare compare the two files using the uniq col(col3). If there are any records in file1 and are not in file2 then I have check the value... (3 Replies)
Discussion started by: rajus19
3 Replies

3. UNIX for Dummies Questions & Answers

Need to get 4 Hrs back time and compare with successive time

Hi all, I am working on a script in which i need to get 4 hrs back time from the current time which i got from this perl function : `perl -e 'print localtime(time() - 14400) . "\n"'` now i need to get this in a loop and increment that time by 15 minutes i.e i=900(=15minutes) `perl... (2 Replies)
Discussion started by: maanik85
2 Replies

4. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies

5. Shell Programming and Scripting

time from 2 files to compare

In first file say first.txt, i have a content say 14:56. In second file, say second.txt i have content say 16:01.... I want to compare if these two times in these 2 files are having a difference of 15 minutes...Can any one please help? (2 Replies)
Discussion started by: manoj.b
2 Replies

6. Shell Programming and Scripting

Compare 2 files, 2 lines at a time

Hi Guys, I want to find any differences between packages installed on 2 servers/zones. I have 2 files that contain the output from pkginfo -x . I want to know if any packages exist only in one file and I want to also know about any packages that exist in both but with a different version. ie:... (8 Replies)
Discussion started by: Tornado
8 Replies

7. Shell Programming and Scripting

compare date and time inside data of two files

i have two files with identical no of columns. 6th columns is date (MM/DD/YY format) and 7th columns is time (HH:MM:SS) format. I need to compare these two vaules and if the date & time is higher than fileA, save it on fileC; if the value is lower, then save it on fileD CONDITIONS... (7 Replies)
Discussion started by: ajiwww
7 Replies

8. UNIX for Dummies Questions & Answers

Compare two flat files and update one based on the values in the other

Hi, I'm a newbie to scripting and am trying to compare two files using awk. The files are exactly the same dimensions. Where the first file has 0's I would like to create an updated version of the second file which has the corresponding elements set to zero also. eg: file1: 12345 1 2 0... (3 Replies)
Discussion started by: kasan0
3 Replies

9. Shell Programming and Scripting

How to compare 2 files and update one?

Hi, I have got 2 files which i need to compare and append based on the below conditions. file 1: File 1 has data in the following format 4300 2356 C234 5689 5500 2345 File 2 has data in the same fomat 4300 49 5555 12345 Now i need to compare the first 4 bytes in each line... (4 Replies)
Discussion started by: roy121
4 Replies

10. Shell Programming and Scripting

Need solution to compare two file and update and append the output

Hi All, I have two files File1 frame,007C1 server1_Parent frame,007C3 server2_Silver frame,007EE server3_Bronze frame,00855 server4_Parent frame,00856 server4_Parent frame,00858 server5_Parent frame,008FA server6_Silver frame,008FB server6_Silver frame,008FC server6_Silver... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
Decimal(3tcl)						  Tcl Decimal Arithmetic Library					     Decimal(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
::Decimal - General decimal arithmetic SYNOPSIS
package require Tcl ?8.5? ::Decimal::fromstr string ::Decimal::tostr decimal ::Decimal::setVariable variable setting ::Decimal::add a b ::Decimal::+ a b ::Decimal::subtract a b ::Decimal::- a b ::Decimal::multiply a b ::Decimal::* a b ::Decimal::divide a b ::Decimal::/ a b ::Decimal::divideint a b ::Decimal::remainder a b ::Decimal::abs decimal ::Decimal::compare a b ::Decimal::max a b ::Decimal::maxmag a b ::Decimal::min a b ::Decimal::minmag a b ::Decimal::plus a ::Decimal::minus a ::Decimal::copynegate a ::Decimal::copysign a b ::Decimal::is-signed decimal ::Decimal::is-zero decimal ::Decimal::is-NaN decimal ::Decimal::is-infinite decimal ::Decimal::is-finite decimal ::Decimal::fma a b c ::Decimal::round_half_even decimal digits ::Decimal::round_half_up decimal digits ::Decimal::round_half_down decimal digits ::Decimal::round_down decimal digits ::Decimal::round_up decimal digits ::Decimal::round_floor decimal digits ::Decimal::round_ceiling decimal digits ::Decimal::round_05up decimal digits _________________________________________________________________ DESCRIPTION
The decimal package provides decimal arithmetic support for both limited precision floating point and arbitrary precision floating point. Additionally, integer arithmetic is supported. More information and the specifications on which this package depends can be found on the general decimal arithmetic page at http://speleotrove.com/decimal This package provides for: o A new data type decimal which is represented as a list containing sign, mantissa and exponent. o Arithmetic operations on those decimal numbers such as addition, subtraction, multiplication, etc... Numbers are converted to decimal format using the operation ::Decimal::fromstr. Numbers are converted back to string format using the operation ::Decimal::tostr. EXAMPLES
This section shows some simple examples. Since the purpose of this library is to perform decimal math operations, examples may be the sim- plest way to learn how to work with it and to see the difference between using this package and sticking with expr. Consult the API section of this man page for information about individual procedures. package require decimal # Various operations on two numbers. # We first convert them to decimal format. set a [::Decimal::fromstr 8.2] set b [::Decimal::fromstr .2] # Then we perform our operations. Here we multiply set c [::Decimal::* $a $b] # Finally we convert back to string format for presentation to the user. puts [::Decimal::tostr $c] ; # => will output 8.4 # Other examples # # Subtraction set c [::Decimal::- $a $b] puts [::Decimal::tostr $c] ; # => will output 8.0 # Why bother using this instead of simply expr? puts 8.399999999999999 ; # => will output 8.399999999999999 puts 7.999999999999999 ; # => will output 7.999999999999999 # See http://speleotrove.com/decimal to learn more about why this happens. API
::Decimal::fromstr string Convert string into a decimal. ::Decimal::tostr decimal Convert decimal into a string representing the number in base 10. ::Decimal::setVariable variable setting Sets the variable to setting. Valid variables are: o rounding - Method of rounding to use during rescale. Valid methods are round_half_even, round_half_up, round_half_down, round_down, round_up, round_floor, round_ceiling. o precision - Maximum number of digits allowed in mantissa. o extended - Set to 1 for extended mode. 0 for simplified mode. o maxExponent - Maximum value for the exponent. Defaults to 999. o minExponent - Minimum value for the exponent. Default to -998. ::Decimal::add a b ::Decimal::+ a b Return the sum of the two decimals a and b. ::Decimal::subtract a b ::Decimal::- a b Return the differnece of the two decimals a and b. ::Decimal::multiply a b ::Decimal::* a b Return the product of the two decimals a and b. ::Decimal::divide a b ::Decimal::/ a b Return the quotient of the division between the two decimals a and b. ::Decimal::divideint a b Return a the integer portion of the quotient of the division between decimals a and b ::Decimal::remainder a b Return the remainder of the division between the two decimals a and b. ::Decimal::abs decimal Return the absolute value of the decimal. ::Decimal::compare a b Compare the two decimals a and b, returning 0 if a == b, 1 if a > b, and -1 if a < b. ::Decimal::max a b Compare the two decimals a and b, and return a if a >= b, and b if a < b. ::Decimal::maxmag a b Compare the two decimals a and b while ignoring their signs, and return a if abs(a) >= abs(b), and b if abs(a) < abs(b). ::Decimal::min a b Compare the two decimals a and b, and return a if a <= b, and b if a > b. ::Decimal::minmag a b Compare the two decimals a and b while ignoring their signs, and return a if abs(a) <= abs(b), and b if abs(a) > abs(b). ::Decimal::plus a Return the result from ::Decimal::+ 0 $a. ::Decimal::minus a Return the result from ::Decimal::- 0 $a. ::Decimal::copynegate a Returns a with the sign flipped. ::Decimal::copysign a b Returns a with the sign set to the sign of the b. ::Decimal::is-signed decimal Return the sign of the decimal. The procedure returns 0 if the number is positive, 1 if it's negative. ::Decimal::is-zero decimal Return true if decimal value is zero, otherwise false is returned. ::Decimal::is-NaN decimal Return true if decimal value is NaN (not a number), otherwise false is returned. ::Decimal::is-infinite decimal Return true if decimal value is Infinite, otherwise false is returned. ::Decimal::is-finite decimal Return true if decimal value is finite, otherwise false is returned. ::Decimal::fma a b c Return the result from first multiplying a by b and then adding c. Rescaling only occurs after completion of all operations. In this way the result may vary from that returned by performing the operations individually. ::Decimal::round_half_even decimal digits Rounds decimal to digits number of decimal points with the following rules: Round to the nearest. If equidistant, round so the final digit is even. ::Decimal::round_half_up decimal digits Rounds decimal to digits number of decimal points with the following rules: Round to the nearest. If equidistant, round up. ::Decimal::round_half_down decimal digits Rounds decimal to digits number of decimal points with the following rules: Round to the nearest. If equidistant, round down. ::Decimal::round_down decimal digits Rounds decimal to digits number of decimal points with the following rules: Round toward 0. (Truncate) ::Decimal::round_up decimal digits Rounds decimal to digits number of decimal points with the following rules: Round away from 0 ::Decimal::round_floor decimal digits Rounds decimal to digits number of decimal points with the following rules: Round toward -Infinity. ::Decimal::round_ceiling decimal digits Rounds decimal to digits number of decimal points with the following rules: Round toward Infinity ::Decimal::round_05up decimal digits Rounds decimal to digits number of decimal points with the following rules: Round zero or five away from 0. The same as round-up, except that rounding up only occurs if the digit to be rounded up is 0 or 5, and after overflow the result is the same as for round- down. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category Decimal 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
decimal, math, tcl CATEGORY
Mathematics COPYRIGHT
Copyright (c) 2011 Mark Alston <mark at beernut dot com> math 1.0.2 Decimal(3tcl)
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy