Hello Everybody,
I tried to find an answer to whatever is happening with my sh, tried a few approaches, but none is working the way I planned... the loop quits with exit 0, runs once, if I comment out `ffmpeg` line, it runs N times as it should - ffmpeg does not error out other than 0
Code:
find . | grep \.mp3 | while read filename
do
newfilename=`echo "$filename" | tr "\.mp3" "\.ogg"`
ffmpeg -i "$filename" -acodec libvorbis -ac 2 -aq 4 -y "$newfilename"
echo inside #4debug
done
echo outside
this sh runs once, echoes "inside" 'n "outside" once, exits with '0'... unless ffmpeg commented out... any ideas?
I also tried to feed the loop with: done < /tmp/fname.list
Thanks!
edit:
BTW, this works well - but I am very interested in the >while read< loop giving up.
Code:
for i in *.mp3; do ffmpeg -i "$i" -acodec libvorbis -ac 2 -aq 4 -y "$(basename "$i" .mp3).ogg"; done