I am using Windows OS.
My program:
#!/bin/bash
OIFS="$IFS"
IFS=$'\n'
find teste1 -type f | while read -r firstResult
do
find teste2 -type f | while read -r secondResult
do
firstName=${firstResult##*[/|\\]}
secondName=${secondResult##*[/|\\]}
if [[ "$( echo "$firstName" | tr [A-Z] [a-z])" == "$( echo "$secondName" | tr [A-Z] [a-z])" ]]; then
echo "$firstResult" "$secondResult" >> equal
else
echo "$firstResult" "$secondResult" >> notEqual
fi
if [[ $firstName == $secondName ]]; then
echo "$firstResult" "$secondResult" >> equal2
fi
done
done
diff -2 "--line-format=%L" "--unchanged-line-format=" equal equal2 > renamedFiles.lst
rm equal
rm equal2
rm notEqual
Whenever I run this program, it says "diff: conflicting line format". However, it produces the "renamedFiles.lst" and produces exactly the way I want. So, why is it giving me this answer? Can I fix it? It doesn't really affect my program but no one likes seeing warnings / errors on their programs, right? :)