tips.paddyonline.net

If you need tips & tricks, here they are...

Compare time on two files in (T)CSH

Compare time on two files in (T)CSH

I really don't like BASH or SH so I try to find ways not to use it.

This is what I came up to for use instead of [< file > -lt < file2 >] compare

if ( (-M < file1 >) >= (-M < file2 > ) )


example

if ( (-M file1) >= (-M file2 ) ) then
echo "file1 is newer then file2"
endif

The added benefit is that you can change the order to do the same as -ot or add more compare options!

Add comment

Security code
Refresh

Please consider supporting our efforts.


Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok Decline