Last change
on this file was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100644
|
File size:
445 bytes
|
Rev | Line | |
---|
[e16e8f2] | 1 | #!/usr/bin/perl |
---|
| 2 | # |
---|
| 3 | # Print the time (possibly the mtime of a file) as a hexadecimal integer |
---|
| 4 | # If more than one file, print the mtime of the *newest* file. |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | undef $now; |
---|
| 8 | |
---|
| 9 | foreach $file ( @ARGV ) { |
---|
| 10 | ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, |
---|
| 11 | $ctime,$blksize,$blocks) = stat($file); |
---|
| 12 | if ( !defined($now) || $now < $mtime ) { |
---|
| 13 | $now = $mtime; |
---|
| 14 | } |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | if ( !defined($now) ) { |
---|
| 18 | $now = time; |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | printf "0x%08x\n", $now; |
---|
Note: See
TracBrowser
for help on using the repository browser.