Article 55J02 Script - Search by part name and extension

Script - Search by part name and extension

by
orangepeel190
from LinuxQuestions.org on (#55J02)
Hi!

I am trying to draft up a script to search a website for a file name that changes week to week.

The file names extension is .mp3 (Simple!)
One part of the file name does not change (again - simple)

The part that is testing is the file name is uploaded in different format each week. Some times is:

#FILE="`date -dsunday +'%d-%m-%Y'`-xxx_news.mp3"
#FILE="`date -dsunday +'%d-%m-%Y'`_xxx_news_64.mp3"
#FILE="`date -dsunday +'%d%m%Y'`_xxx_news_64.mp3"
#FILE="`date -dsunday +'%d%m%Y'`-xxx_news_64.mp3"
#FILE="xxx_news_64-`date -dsunday +'%d-%m-%Y'`.mp3"
#FILE="xxx_news_32-`date -dsunday +'%d-%m-%Y'`.mp3"
#FILE="xxx_news_64_`date -dsunday +'%d-%m-%Y'`.mp3"
#FILE="xxx_news_32_`date -dsunday +'%d-%m-%Y'`.mp3"
#FILE="xxx_news_64-`date -dsunday +'%d%m%Y'`.mp3"
#FILE="xxx_news_64_`date -dsunday +'%d%m%Y'`.mp3"

As you can see, there are some parts of the file name on the website that remain constant - yet some (inc the date string) changes.....

I am seeking assistance in drafting up a line fo the download script to be able to find the *news*.mp3 file on the website and download it to my system - where it will cp/mv the file to a dedicated location and save it under a "known" filename.

Thoughts/comments/suggestions?

Thank youlatest?d=yIl2AUoC8zA latest?i=0oaRvi0Cj70:WT6tVYJPjFM:F7zBnMy latest?i=0oaRvi0Cj70:WT6tVYJPjFM:V_sGLiP latest?d=qj6IDK7rITs latest?i=0oaRvi0Cj70:WT6tVYJPjFM:gIN9vFw0oaRvi0Cj70
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments