File: file-newer

package info (click to toggle)
xemacs21-packages 2009.02.17.dfsg.2-4
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 116,276 kB
  • ctags: 89,333
  • sloc: lisp: 1,232,060; ansic: 16,570; java: 13,514; xml: 6,477; sh: 4,617; makefile: 4,022; asm: 3,007; perl: 840; cpp: 500; ruby: 257; csh: 96; haskell: 93; awk: 49; python: 47
file content (9 lines) | stat: -rwxr-xr-x 184 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl
#file-newer: Return 1 if file 1 is newer than file 2, else 0

$cmp = (stat($ARGV[0]))[9] - (stat($ARGV[1]))[9];
if ($cmp > 0)
   { print "1"; }
else
   { print "0"; }