Eu acho que você deveria estar usando um loop
IFR=$'IFR=$'%pre%' # because you use -print0 on your find
for jpg_file in 'find -iname '*.jpg' -print0'
do
pdf_file='echo "$jpg_file" | sed 's/jpg$/pdf/i''
if [ -e "$pdf_file" ]; then
echo "$pdf_file exist"
else
echo "$pdf_file missing"
fi
done
' # because you use -print0 on your find
for jpg_file in 'find -iname '*.jpg' -print0'
do
pdf_file='echo "$jpg_file" | sed 's/jpg$/pdf/i''
if [ -e "$pdf_file" ]; then
echo "$pdf_file exist"
else
echo "$pdf_file missing"
fi
done