[GTALUG] Bash Problem
William Park
opengeometry at yahoo.ca
Sun Jan 8 10:21:52 EST 2017
On the topic of quotes, see my in-line comments...
On Sun, Jan 08, 2017 at 05:57:40AM -0500, Stephen via talk wrote:
> On 2017-01-07 07:25 PM, Stephen via talk wrote:
> > #!/bin/bash
> > # Usage: convert file to mp4
> > shopt -s nullglob
> > ext='.mp4'
> > for f in *.mkv
> > do
> > base=$(basename $f .mkv)
Should be
base=$(basename "$f" .mkv)
> > nFname=$base".mp4"
nFname="$base".mp4
> > echo $nFname
> > avconv "-i $f -c:v libx264 -c:a copy $nFname"
avconv -i "$f" -c:v libx264 -c:a copy "$nFname"
> > done
>
>
> Thank you for the replies. Simply removing the quotes did the trick! :)
More information about the talk
mailing list