Bash programming help

Hello all;

I have little knowledge of bash programming, and I was wondering if you could help me out.

I would like to create a bash script, as detailed below.

process.sh is the bash script itself
list.dl is a text file. In this text file, the first line is the directory from /var/www/downloads/ I would like it to be (so if the first line is "testing" the full directory would be /var/www/downloads/testing). Starting from the second line downward, there are direct URL download links.

This is what I want the script to do:

  1. Read the first line of the textfile list.dl and save it as a variable.
  2. Delete the first line so that every used line becomes a URL download link
  3. Add the variable to the directory path (/var/www/downloads/testing if the first line said "testing")
  4. Go to the directory path (/var/www/downloads/testing)
  5. Wget every link from the text file to there
  6. Output a text file with all links to the files on the server (/var/www/downloads/testing/test.zip is already <ip>/download/testing.zip on my server) so that I may download them.

I have absolutely no idea how to program this, any help would be appreciated.
Sincerely,
tehalexf

This does not delete the first line of input. It works non-destructively

cnt=0
mydir=/var/www/downloads
while read rec
do
   cnt=$((  $cnt + 1 ))
   if [ $cnt -eq 1] ; then
         cd $mydir/${rec}
         continue        
   fi
   wget [you put options here if you want them] $rec
done < test.dl

common options are:
-nc do not overwrite existing files
-O filename one single filename for all of the downloads from one URL