#!/bin/bash

# This script gets an episode of Going Linux.

echo "Enter an episode number. Example 041 for episode 41."

read episode

# The url of all episodes starts the same.
# For instance http://www.archive.org/download/glp038/glp038.mp3
# starts with http://www.archive.org/download/glp
# then the episode number. Then glp. The episode number again,
# and .mp3
# Let's put the first part into a string variable.

urlstart="http://www.archive.org/download/glp"

# We are going to use wget to fetch the file.
# Replace .mp3 with .ogg if you like.

wget "$urlstart$episode/glp$episode.mp3"