And I think I prefer my newer function (hacked from a sh script of
uncertain origin). Options like !-s, -l, and -[acm] are left as an
exercise for the reader. It's one less binary to carry around. (N.B.,
this is in rc.)
fn newer {
if ( ! ~ $#* 2 ) {
echo >[1=2] 'usage: newer file1 file2'
return 1
}
file1 = $1 file2 = $2 {
* = `{ ls -td $file1 $file2 >[2=] }
~ $file1 $1
}
}