[GTALUG] Bash Problem
Stephen
stephen-d at rogers.com
Sat Jan 7 19:25:33 EST 2017
I am new to Bash scripts.
I am trying to create a script to use avconv to convert mkv files to mp4
file.
Run one at a time the command runs fine.
When I execute this script I get an error about an unknown parameter. I
am guessing that the expansion with the filename variables is failing.
Can someone help me correct?
Thank you!
#!/bin/bash
# Usage: convert file to mp4
shopt -s nullglob
ext='.mp4'
for f in *.mkv
do
base=$(basename $f .mkv)
nFname=$base".mp4"
echo $nFname
avconv "-i $f -c:v libx264 -c:a copy $nFname"
done
--
Stephen
More information about the talk
mailing list