Help with modifying a bash command
by solex from LinuxQuestions.org on (#58YKS)
I have been trying to debug the following script and it is mostly complete.
Goal: I would like to to recursively traverse my music folder for all WAV files and convert them to flac using ffmpeg in addition to renaming them with a .flac extension.
The original version of this works w/o a problem but it renames the file to '$$$$.wav.flac'. I added the cut command to try to remove the .wav before appending the .flac but it does not work.
Code:| cut -f 1 -d '.'Code:find ./ -iname '*.wav' -exec bash -c 'ffmpeg -i "{}" "{}" | cut -f 1 -d '.'.flac && rm "{}"' \;I suspect it has to do with command subsitution but am not sure how to proceed any would be appreciated.


Goal: I would like to to recursively traverse my music folder for all WAV files and convert them to flac using ffmpeg in addition to renaming them with a .flac extension.
The original version of this works w/o a problem but it renames the file to '$$$$.wav.flac'. I added the cut command to try to remove the .wav before appending the .flac but it does not work.
Code:| cut -f 1 -d '.'Code:find ./ -iname '*.wav' -exec bash -c 'ffmpeg -i "{}" "{}" | cut -f 1 -d '.'.flac && rm "{}"' \;I suspect it has to do with command subsitution but am not sure how to proceed any would be appreciated.