You have to name the file recursive_diff.sh and place it in your home, sorry this is my first script and I dont know how to use paths, there are 3 parameters.
To call the script there are 3 parameters:
sh recursive_diff.sh original_directory copy_directory diff_files_firecory
sh recursive_diff.sh my_project my_copy different_files
#!/bin/bash for i in $(ls $1) do if [ -f "$1/$i" ];then filename="$3/$i.diff" diff $1/$i $2/$i > $filename filesize=$(wc -c < $filename) if [ $filesize = 0 ];then rm $filename fi else mkdir $3/$i sh $HOME/recursive_diff.sh $1/$i $2/$i $3/$i fi done