The problem is in this line:
-e 's/\ Xvid\-Lol//i; s/\ Xvid\-Xor//i; s/\ Xvid\-Notv//i; s/\ Xvid\-Fqm//i; s/\ Xvid\-p0w4//i; Xvid\-BIA//i; s/\ Xvid\-Chgrp//i; s/\ Xvid\-Fov//i' \
There is no s/ . It should be:
-e 's/\ Xvid\-Lol//i; s/\ Xvid\-Xor//i; s/\ Xvid\-Notv//i; s/\ Xvid\-Fqm//i; s/\ Xvid\-p0w4//i; s/\ Xvid\-BIA//i; s/\ Xvid\-Chgrp//i; s/\ Xvid\-Fov//i' \
I have included backslash for consistency.
This line is missing //i :
-e 's/\ PDTV\-Fov//i; s/\ PDTV\-River//i; s/\ PDTV\-Sfm
Fixed:
-e 's/\ PDTV\-Fov//i; s/\ PDTV\-River//i; s/\ PDTV\-Sfm//i
The error messages I received led me to the source of the errors:
sed: -e expression
and
sed: -e expression
Here's a suggestion on how to make this more readable and maintainable:
while read -r pattern do sedscript+="$pattern;" done <<EOF s/ \([^ ]*\)$/.\1/ s/\ \[sharethefiles\ com\]//i s/\ x264\-Ctu//i s/\ x264\-Bia//i ... s/\ XVID//i EOF renF=$(echo $f | tr '.' ' ' | sed -e "$sedscript")
Dennis williamson
source share