Batch Downloading Numbered Files

    The following script will download a sequence of numbered files.#! /bin/bashfor x in `seq -w 60 181`do    wget ""$x".mp3"done     So in this case it will download DGW-060.mp3, DGW-061.mp3 … DGW-181.mp3.      Getting the script to loop through a sequence of numbers was tricky until I found the seq command.  The -w parameter […]

ffmpeg: Batch Converting

    I was getting tired of converting each individual flash video to mpg by hand, so I wrote a script to convert every .flv file in a directory.#!/bin/shfor f in *.flv ;do FILE=${f%%.flv}; ffmpeg -i "$FILE.flv" -target ntsc-dvd -s 320×240 "$FILE.mpg" done    Using my favorite bash scripting tutorial: The Advanced Bash scripting Guide, I figured out how […]