Artificial intelligent assistant

Read files in Directory and take diff I have two directories named comp1 and comp2 and both have files named file1 and file2. I need a bash script which read file1 from both the directories and take diff of each file and redirect to some other file. For example. diff comp1/file1 comp2/file1 > file1.diff

#!/bin/sh

for f in comp1/* ; do
diff "comp1/$f" "comp2/$f" > "$f.diff"
done


This script assumes you have files of the same name in both directories.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 49398782fca4209c6b17d91a67699919