Overview:
Write a BASH script to check (using the CRON) for content on a remote HTTP server and download to local server.
Details:
- Access HTTP server using a username and password
- Check specified HTTP URL (1) for files
- If files exist get their details
- Check to see if files are on local server
+ If files do not exists on local server then
- Create two directories based on file name (i)
- Download files into folder
- Check specified HTTP URL (2) for files
- If files exist get their details
- Check to see if files are on local server
+ If files do not exists on local server then
- Create two directories based on file name (ii)
- Download files into folder
(i) the files are named using the format [login to view URL] for example (where 20110222 is the date in YYYMMDD format). The first directory name that would need to be created is the date (YYYMM) from the filename minus the day, the 2nd directory if the full date (YYYMMDD). For example
mkdir 201102
cd 201102
mkdir 20110222
cd 20110222
(ii) the files are named using the format [login to view URL] for example (where 20110222 is the date in YYYMMDD format). The first directory name that would need to be created is the date (YYYMM) from the filename minus the day, the 2nd directory if the full date (YYYMMDD) plus a 'w' at the end. For example
mkdir 201102
cd 201102
mkdir 20110222w
cd 20110222
Hi, i'm skilled linux administrator with strong Bash knowledge, and i will gladly create this script for you. Please feel free to ask me any question or to send me more information via PMB. Thank you.
I am a Linux administrator with years of experience in large enterprises. I am doing bash scripting every day and I should be able to create the required script for you quickly and efficiently.