File: testnewer

package info (click to toggle)
vrweb 1.5-5.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 15,124 kB
  • ctags: 27,485
  • sloc: cpp: 134,333; ansic: 95,670; sh: 1,072; asm: 712; makefile: 610; pascal: 536; perl: 347; csh: 26
file content (24 lines) | stat: -rwxr-xr-x 424 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh

# returns 0 when $1 newer than $2 or $2 does't exist
#
# $Id: testnewer,v 1.1 1995/11/27 07:58:10 gpani Exp $
# $Log: testnewer,v $
# Revision 1.1  1995/11/27 07:58:10  gpani
# Initial revision
#
# Revision 1.1  1995/11/15 07:54:24  gpani
# Initial revision
#

if [ ! -f "$2" ] ;
then 
        exit 0 ;
fi
 
if [ "0`find $1 -newer $2 -exec echo 1 \;`" -eq "1" ] ; 
then
        exit 0 ;
else
        exit 1 ;
fi