Right now, this is what my code looks like:
#!/bin/bash Dir1=$1 Dir2=$2 for file1 in $Dir1/*; do for file2 in $Dir2/*; do if [[ $file1 == $file2 ]]
I just tested this and it worked:
DIR1=$(ls dir1) DIR2=$(ls dir2) for i in $DIR1; do for j in $DIR2; do if [[ $i == $j ]]; then echo "$i == $j" fi done done