Back to problems
COMP2041
21T2 Q11 — Compare two directory trees
Args: two directory pathnames. Print one line with 4 integers:
- files at the same relative path in both trees, same size
- same relative path in both, different size
- files only in the first tree
- files only in the second tree
Same relative pathname is required to be "present in both".
POSIX shell only (#!/bin/dash); standard UNIX filters; no awk, Perl, C or Python. From COMP2041/9044 21T2 Final.
Samples
stdin
expected
3 0 0 0
shell
14