Please help. I'm trying to replace absolute ftp links in 13 thousand HTML files to relative links. I have found this script but unfortunately it is not created with branched directory trees in mind :/
This fails with cmp complaining that some files are directories. After removing the if-statement, it fails the same, but silently:
cd Kondor_html
for y in *
do
sed 's_ftp:////unicorn.wereanimal.net_..//..//.._' "$y" >temp
if cmp temp "$y" >/dev/null
then
rm temp
else
mv temp "$y"
fi
done
Updated