Linux bash shell provides 2 types of test:
+ ( -ot ) : is other than
+ ( -nt ) : is newer than
#!/bin/sh if [ "$file1" -nt "$file2" ] then echo -e "$file1 is newer than $file2" else echo -e "$file1 is older than $file2" fi
Linux bash shell provides 2 types of test:
+ ( -ot ) : is other than
+ ( -nt ) : is newer than
#!/bin/sh if [ "$file1" -nt "$file2" ] then echo -e "$file1 is newer than $file2" else echo -e "$file1 is older than $file2" fi