/bin/sh for i in *.org; do j=$(echo $i | sed -e 's/org$/pdf/g') if test ! -f $j; then echo $i fi done