Saving files with file name as output

Hi,

i need help with a file creation of an output program. I've got a program that with #find creates an output for each files in a directory.

If i give this command :

-o spec$(date -u +%Y%m%dt%H%M)

it creates just one file, overwriting all the others since it is the creation date . What is the correct sintax to create an output with the related input file? -o is an option inside the program.

find /*.wav -exec xxx {}  -o spec-$(date -u +%Y%m%dt%H%M)  \; 

Thanks

Regards

Let me understand here.

Hmm.

[ -d /spec ]  || mkdir /spec
find /*.wav | 
while read fname 
do
    xxx $fname  -o /spec/spec-${fname}-$(date -u +%Y%m%dt%H%M)  
done

I added the /spec thing to prevent littering up the / directory.
You should remove it if it is not needed.

Will this give the correct output?

1 Like

Yup it works like a charm , thanks mcnamara