for i in $(ls raw/*.CR2); # Dateinamen sind nummeriert wie raw/_MG_1234.CR2 do j=$(echo $i | cut -d\/ -f 2 | cut -d\. -f 1); # In $j steht jetzt _MG_1234 nice ufraw-batch --overwrite raw/$j.CR2 --compression=90 --out-type=jpeg --output jpg/$j.JPG; done