What you will build
Step 1: Create the sample tree
Create files/a.txt with the text same, then make two copies of it: files/b.txt and files/sub/d.txt. Also create files/c.txt with different text:
cd /workspace
mkdir -p files/sub
printf 'same\n' > files/a.txt
cp files/a.txt files/b.txt
cp files/a.txt files/sub/d.txt
printf 'other\n' > files/c.txtStep 2: Write dupes.sh
Write /workspace/dupes.sh. It takes one directory, walks its regular files in sorted order with a NUL-separated list, computes a checksum for each, and prints every file whose checksum already appeared. Use an associative array declared with declare -A.
Run it with: bash dupes.sh files. The output must be exactly the two lines files/b.txt and files/sub/d.txt.
Files
dupes.sh: the finished script.walkthrough.sh: every step of the reference solution, in order.
How it is checked
Each step in the guided lab has a check script that runs on the lab machine after you finish. It passes only when the files and output it expects are there, so the lab cannot be completed by reading alone.