Shell script - Download - Mysql replace


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script - Download - Mysql replace
# 1  
Old 05-06-2014
Shell script - Download - Mysql replace

Hi,

I have a video script. it has embedded Youtube videos. I want replace them downloaded version mp4 videos.

this script has a mysql table. I want search "url_flv" field on table a youtube link if has a youtube link I want download it this command.
I want extract uniq_id field for file name
Code:
youtube-dl -o '/home/videoscript/uploads/videos/123456.mp4' -f 18 http://www.youtube.com/watch?v=sFu5qXMuaJU

and I want replace mysql for downloaded versions:

original mysql:

table: pm_videos

fields:

Code:
id: 1200
uniq_id: 123456
url_flv: http://www.youtube.com/watch?v=sFu5qXMuaJU
source_id: 3

I want change them.

Code:
id: 1200
uniq_id: 123456
url_flv: 123456.mp4
source_id: 1

# 2  
Old 05-07-2014
It's not clear what the relation of the youtube command and what appear
to be data from a mysql database. Please provide a better explantation.
# 3  
Old 05-07-2014
it is solved thanks.

Last edited by tara123; 05-08-2014 at 10:12 PM.. Reason: Add and fix CODE tags.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Download a db table through UNIX shell script

Hi, I'm an amateur and need your help in figuring this out. I have been asked to connect to a prod db from non-prod env., and download a table from prod db to non-prod env. I was able to connect to the prod db and then run a simple query as below. @@@@@@@@@@ ... (7 Replies)
Discussion started by: arunpvp
7 Replies

2. Ubuntu

Bash script for FTP download -Mysql

Hi guys, I recently managed to write up my working script, but now I have a problem. If the file isn't there in the remote server, my actual script jumps it and all ok, but I need something like this: Search file -> if there, then download -> if not, download next file in the list. Any... (7 Replies)
Discussion started by: virtus96
7 Replies

3. UNIX for Dummies Questions & Answers

Download .xls file from mail and copy to another path using shell script

Hi I have a mail attachment coming from a mail id and evreytime with the same name in .xls format.I have to download the .xls file into a location and convert it itno .csv format and copy the .csv file to another location. (1 Reply)
Discussion started by: bikky6
1 Replies

4. Shell Programming and Scripting

Need of shell script to download data using ftp

Hi ! I am just wondering shell script to download data from ftp... I have text file containing ftp address...looks like this ftp://site...../filename.xyz ftp://site...../filename.xyz ftp://site...../filename.xyz ftp://site...../filename.xyz script has to read ftp address and... (8 Replies)
Discussion started by: nex_asp
8 Replies

5. Shell Programming and Scripting

Shell Script for Upload/download files using cURL

hi please help me out here, i want to use curl command in shell script to test web pages, what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output page,... (2 Replies)
Discussion started by: Olivia
2 Replies

6. Shell Programming and Scripting

Shell script to automatically download files

I am new to shell scripting and need to write a program to copy files that are posted as links on a specific url. I want all the links copied with the same file name and the one posted on the webpage containing the url onto a specific directory. That is the first part. The second part of the script... (2 Replies)
Discussion started by: libertyforall
2 Replies

7. Shell Programming and Scripting

shell script to download variables files

Hello all i am working on creating shell script to download files daily example : file12_10_2009.txt.gz next day this file will be file13_10_2009.txt.gz and so on.. i need help to know how to download this incrimental date files daily ? regards (1 Reply)
Discussion started by: mogabr
1 Replies

8. Linux

shell script to download files from a site?

Hey everyone, my wife has purchased a bundle package of a bunch of images from a site, and now has to download each one of them manually. There are about 500 downloads, and it's quite a hassle to browse to each page and download them all individually. I would like to write a shell script to... (2 Replies)
Discussion started by: paqman
2 Replies

9. Shell Programming and Scripting

Mysql with shell script

Hi did any books teaching beginner to run mysql using BASH shell? thkx (5 Replies)
Discussion started by: lijiajin
5 Replies

10. Shell Programming and Scripting

Automatic download of csv file using a shell script

I want to automatically download a CSV file daily which can be found here: http://www.londonstockexchange.com/en-gb/pricesnews/prices/coveredwarrants/search.htm and the link is named "Click to download covered warrants (100Kb)" onthe right hand side. What commands can I use to invoke clicking... (1 Reply)
Discussion started by: figaro
1 Replies
Login or Register to Ask a Question