Print non-existent files from a pipe input

view story

http://unix.stackexchange.com – I have a directory of lots of .PDF and .JPG files. There should be a .JPG file for each .PDF with the same name. I'm trying to use a command to find .PDF files that doesn't have a .JPG file. My current command is: find -iname '*.jpg' -print0|sed 's/jpg$/pdf$/ig' |xargs -0 ls This prints : No such file or directory error for non-existing files; the problem is the errors of ls cannot be handled by grep or sed . Any of these solves my problem: How can I make ls only list files that doesn't exists? How to handle/filter errors of ls with sed/grep? any other way for file existence che (HowTos)