find /the/source/dir -type f -iname "*.doc*" | sort -u | sort |\ while read afile; do printf "\n\n -- $afile \n" /usr/bin/soffice \ --headless \ --convert-to "txt:Text" \ --outdir /tmp/aaa \ "$afile" 2>&1 | grep -iv "no handler" | sort -u # break done printf "\n\n"