Hi all
This is probably an easy question, but for some reason I can't figure out why my loop ends doing only one task.
Code:
#!/bin/bash
#used to create playable podcast files on my sony mp3 player
#jk 12-29-06
# datadir is the directory where you want altered podcasts saved to:
datadir=48k
# create datadir if necessary:
mkdir -p $datadir
while read podcast
do
podcast48k=48k$podcast
/usr/bin/ffmpeg -i $podcast -ab 48 -ac 2 -ar 44100 -acodec mp3 $datadir/$podcast48k &> /dev/null
done< podcast.m3u
####wrote the below to test what i think should happen and it does what i think####
#while read podcast
# do
# podcast48k=48k$podcast
# echo $podcast
# echo $podcast48k
# sleep 2
# done< podcast.m3u
exit
I'm using bashpodder to get my podcast, which creates a simple playlist named podcast.m3u. Then I need to convert the files into something my sony mp3 player can read(mainly 44100 sample rate). I'm going to run the above to do that, but it ends after 1 line of the .m3u file. Any help would be appreciated
Thanks John