Sponsored Content
Full Discussion: compare files acess time
Top Forums UNIX for Dummies Questions & Answers compare files acess time Post 21572 by AkumaTay on Sunday 19th of May 2002 03:02:17 PM
Old 05-19-2002
Quote:
Originally posted by Bab00shka
Try this:

if [ `find xfile -newer yfile` ]
then
echo "xxx"
fi

In the above we are testing for a string to be returned.

If xfile is newer than yfile then the find statement will return the string "xfile", hence the test will be true and perform the if statement.

If xfile is not newer than yfile then the find statement will not return anything, so the test will be false and the if statement will not be performed.

Let me know how you get on.

Cheers
Helen Smilie
Thx !..I had got it done!..Smilie from: AkumaTay
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

compare update time of files

Hi, does anyone know of a way to compare files update time (not only days - also hours and minutes) (command? scripts? perl scripts?) Dori (8 Replies)
Discussion started by: dorilevy
8 Replies

2. UNIX for Dummies Questions & Answers

Acess HD from live CD

Ok, so say I boot off a live Knoppix CD. Is there any way I could access the harddrive (and files on it) from the live CD? Is it complicated? Thanks alot, John (3 Replies)
Discussion started by: jjvacc
3 Replies

3. AIX

Ftp acess problem

Hello I've just installed openSSL and SSH on my AIX 5.3 TL04 and started having a problem with acces to ftp. When I try to log in to ftp on my AIX server, I always get message like this: "530 User root access denied". The same problem occurres with all users. Can anyone help me? Regards Pit (3 Replies)
Discussion started by: piooooter
3 Replies

4. Programming

How to acess unix from windows

Hai Everyone, I am newcomer to UNIX. I am interested to write a prograame in windows which connects to unix server and executing a script and return the result. Is it possibele or not. Please suggest me. Thank you in advance. With Regards sanjeeb (3 Replies)
Discussion started by: Sanjeeb
3 Replies

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

Require compare command to compare 4 files

I have four files, I need to compare these files together. As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes. Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies

9. 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

10. 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
EXECUTE(7)                                                         SQL Commands                                                         EXECUTE(7)

NAME
EXECUTE - execute a prepared statement SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ] DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the pre- pared statement must have been created by a PREPARE statement executed earlier in the current session. If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of their parameters; the name of a prepared statement must be unique within a database session. For more information on the creation and usage of prepared statements, see PREPARE [prepare(7)]. PARAMETERS
name The name of the prepared statement to execute. parameter The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the data type of this parameter, as was determined when the prepared statement was created. OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE. EXAMPLES
Examples are given in the Examples [prepare(7)] section of the PREPARE [prepare(7)] documentation. COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a somewhat different syntax. SEE ALSO
DEALLOCATE [deallocate(7)], PREPARE [prepare(7)] SQL - Language Statements 2010-05-14 EXECUTE(7)
All times are GMT -4. The time now is 02:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy