E.g., if you want to merge two directories with each other (by moving everything from directory 1 into directory 2), and both directory 1 and directory 2 have some files with the same name.
Then how can you write code such that if SharedFile is found in both directories, then replace SharedFile in directory 2 with SharedFile in directory 1 IF SharedFile is bigger in directory 1 and SharedFile has a later modification date in directory 1? (but do not replace SharedFile otherwise).
I'm fine with both tcsh and bash scripts.