On Mon, Feb 25, 2013 at 2:22 PM, Bernhard Voelker
On 02/25/2013 07:35 PM, Greg Freemyer wrote:
In non-working-psuedo-find-language I want to find a command to do:
find . -name \*.E01 -exec ewfverify -l $(basename '{}').ewfverify.out '{}' ;
Hi Greg,
if you can control the file names, i.e. that there are no "bad" ones with spaces or other unusual characters, then I'd use the shell:
find . -name '*.E01' | while read F do ewfverify -l "$(basename $F).ewfverify.out" "$F" done
Otherwise, you could use -execdir:
$ find . -name '*.E01' -execdir ewfverify -l $(pwd)/'{}'.out '{}' \;
But be aware that input files with the same basename will owerwrite each others .out file (in both above variants), as it they all are written in the current (working) directory.
Have fun, Berny
2 more good solutions. Both seem to work fine. And yes, my filenames are guaranteed unique, otherwise I would dump the verify log in the directory with the image. Thanks Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org