basic script help
Posted: April 14th, 2013, 10:46 am
Hi,
I'm trying to convert mp4 to avi
I started with a script that list mp4 (or mkv) files and then process them but I'm stuck at the first step
The list created of mp4 files has this content:
S01E08 - Veritas.mp4
S01E09 - Ouroboros.mp4
but the echoing from the for loop is not using the whole name and is using the blank spaces as separators
giving me the output like this
S01E08
-
Veritas.mp4
S01E09
my test script
#!/bin/sh
FFMPEG=/usr/bin/ffmpeg
MEDIAINFO=/usr/bin/mediainfo
FOLDER="/media/Volume0/TV/House of Lies/Season 1"
EPLIST=/home/mishou/list-files.txt
echo $FOLDER
cd "$FOLDER"
ls |grep mp4 > $EPLIST
ls |grep mkv >> $EPLIST
for EPISODE in `cat $EPLIST`
do
echo $EPISODE
# process episode
done
any ideas of what I'm doing wrong ?
Thank you
Mishou
I'm trying to convert mp4 to avi
I started with a script that list mp4 (or mkv) files and then process them but I'm stuck at the first step
The list created of mp4 files has this content:
S01E08 - Veritas.mp4
S01E09 - Ouroboros.mp4
but the echoing from the for loop is not using the whole name and is using the blank spaces as separators
giving me the output like this
S01E08
-
Veritas.mp4
S01E09
my test script
#!/bin/sh
FFMPEG=/usr/bin/ffmpeg
MEDIAINFO=/usr/bin/mediainfo
FOLDER="/media/Volume0/TV/House of Lies/Season 1"
EPLIST=/home/mishou/list-files.txt
echo $FOLDER
cd "$FOLDER"
ls |grep mp4 > $EPLIST
ls |grep mkv >> $EPLIST
for EPISODE in `cat $EPLIST`
do
echo $EPISODE
# process episode
done
any ideas of what I'm doing wrong ?
Thank you
Mishou