shell script

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

I need to modify my shell script to download only files with specific filename attributes. Here is what I'm currently using (I only copied the portion of the script that is relevant, I think):

cd $FILELOCATION

for file in `curl –connect-timeout 10 http://$DASHCAM_IP/[login to view URL] | sed 's/^n://' | sed 's/F.mp4//' | sed 's/R.mp4//' | sed 's/,s:1000000//' | sed $'s/\r//' | grep 'Record' | sort -u`;

do

wget -T 10 -t 2 -c http://$DASHCAM_IP$file\[login to view URL];

wget -T 10 -t 2 -c http://$DASHCAM_IP$file\[login to view URL];

wget -T 10 -t 2 -nc http://$DASHCAM_IP$file\[login to view URL];

wget -T 10 -t 2 -nc http://$DASHCAM_IP$file\[login to view URL];

wget -T 10 -t 2 -nc http://$DASHCAM_IP$[login to view URL];

wget -T 10 -t 2 -nc http://$DASHCAM_IP$file.3gf;

done

It currently pulls files with five different extensions and saves them with the extension noted above. I want to keep this functionality but modify it so that the script only downloads files from a range of time. The time is noted in the file name. For example: [login to view URL] (this translates to 2019/03/16 at 13:06:47) or 20190306_174605_PR.thm. (the format: YYYYMMDD_HHMMSS).

The time range I would like to pull is from 5:00 to 22:00 (5AM to 10PM).

Linux Shell Script

Project ID: #19010527

About the project

1 proposal Remote project Active 5 years ago

Awarded to:

AhmadSameer

Hey there, I'm a System Engineer with coding skills. I had developed tons of shell scripts. I can help. Regards.

$30 USD in 1 day
(31 Reviews)
4.8