- Prison Code Breaker Diary -

=> aka: Nhật Kí Code Tù

Categories

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

0 comments

Post a Comment