Sponsored Content
Top Forums Shell Programming and Scripting download an html file via wget and pass it to mysql and update a database Post 302518005 by kevintse on Thursday 28th of April 2011 12:31:19 PM
Old 04-28-2011
You are right, scottn, but please don't mind, that was just a joke.
I hope I could always be helpful.

Code:
html=`wget -q -O - http://url.com`
# html=`curl -s http://url.com` # would be more succinct
mysql -uuser -ppwd -h HOST -P PORT -D DB_NAME -A -e "UPDATE TABLE SET COLUMN=\'$html\' WHERE x=y"

Note: you may have to escape some special characters in $html for MySQL, otherwise, the UPDATE statement may fail.

---------- Post updated at 11:31 AM ---------- Previous update was at 11:28 AM ----------

Quote:
Originally Posted by Chirel
Yes i was the first to have the same reply.

I know it's not helpful but i think, it's the best answer we can have to such a generic and unclear question.
Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to download file using wget

Hi I need a Shell script that will download a text file every second from a http server using wget. Can anyone provide me any pointers or sample scripts that will help me go about this task ??? regards techie (1 Reply)
Discussion started by: techie82
1 Replies

2. UNIX for Dummies Questions & Answers

Using wget to download a file

Hello Everyone, I'm trying to use wget recursively to download a file. Only html files are being downloaded, instead of the target file. I'm trying this for the first time, here's what I've tried: wget -r -O jdk.bin... (4 Replies)
Discussion started by: thoughts
4 Replies

3. Shell Programming and Scripting

download a particular file using wget

Hi All I want to download srs8.3.0.1.standard.linux24_EM64T.tar.gz file from the following website : http://downloads.biowisdomsrs.com/srs83_dist/ But this website contains lots of zipped files I want to download the above file only discarding other zipped files. When I am trying the... (1 Reply)
Discussion started by: alphasahoo
1 Replies

4. UNIX and Linux Applications

download file using wget

I need to download the following srs8.3.0.1.standard.linux26_32.tar.gz file from the following website: http://downloads.biowisdomsrs.com/srs83_dist There are many gzip files along with the above one in the above site but I want to download the srs8.3.0.1.standard.linux26_32.tar.gz only from... (1 Reply)
Discussion started by: alphasahoo
1 Replies

5. Shell Programming and Scripting

How to download to a file using wget in perl?

Hi, I want to download some online data using wget command and write the contents to a file. For example this is the URL i want to download and store it in a file called "results.txt". #This is the URL. $url="http://www.example.com"; #retrieve data and store in a file results.txt ... (3 Replies)
Discussion started by: vanitham
3 Replies

6. Shell Programming and Scripting

How to download file without curl and wget

Hi I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget. Can anyone will help me go about this task ??? Thanks!! (1 Reply)
Discussion started by: rubber08
1 Replies

7. Shell Programming and Scripting

MySQL bulk retrieval of database through html form

Have to delete this long post. Seems nobody would spent time on it. (0 Replies)
Discussion started by: yifangt
0 Replies

8. Shell Programming and Scripting

Scrape 10 million pages and save the raw html data in mysql database

I have a list of 10 million page urls. I want those pages scraped and saved in the mysql database as raw html. I own a Linux VPS server with 1GB RAM and WHM/cPanel. I would like to scrape at least 100,000 urls in 24 hours. So can anyone give me some sample shell scripting code? (4 Replies)
Discussion started by: Viruthagiri
4 Replies

9. Shell Programming and Scripting

Wget download file ( do not overwrite )

Hello all, I want to write auto update script for my embedded device, which can check and download newer version of my program and extract the files on the device. The download center is hosted on remote web server . Script checks the hosted file on web site and if the new version is there... (8 Replies)
Discussion started by: stefki
8 Replies

10. UNIX for Dummies Questions & Answers

Using symbolic link for database MySQL in CentOS, not update sizing

I have no idea what I should set the topic here ==' This is my story, please you there kindly help me I'm quite newbie for this. ================================== My host server is CentOS, I spared 9.9GB for /var path that used by MySQL and...It's full because of heavy load traffic, then... (1 Reply)
Discussion started by: Kapom
1 Replies
MYSQL2DLF.IN(1) 					  LogReport's Lire Documentation					   MYSQL2DLF.IN(1)

NAME
mysql2dlf - convert mysql logfiles to dlf format SYNOPSIS
mysql2dlf DESCRIPTION
mysql2dlf converts a MySQL query log file to DLF format. Information on MySQL can be found on http://www.mysql.org/. The query log file is defined by the --log[=file] option of mysqld, or the log=file setting in MySQL configuration file. Such a log file looks like e.g. /usr/sbin/mysqld, Version: 3.23.43-debug-log, started with: Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock Time Id Command Argument 011218 15:02:58 1 Connect root@localhost on 1 Query SHOW VARIABLES LIKE 'pid_file' 1 Shutdown 011226 21:35:59 6 Connect joe@localhost on 6 Init DB nmrshiftdb 6 Query SHOW VARIABLES or 42401 Query SELECT bannerID, banner, format, width, height, alt, url FROM banners WHERE act = 'true' AND (keyw = 'fullsize' OR keyw = 'global') The generic database dlf format is described in database.xml. EXAMPLES
To process a log as produced by MySQL: $ mysql2dlf < mysql-log mysql2dlf will be rarely used on its own, but is more likely called by lr_log2report: $ lr_log2report mysql < /var/log/mysql-log NOTES
The parser has been tested for query log files for MySQL 3.23.46 only. BUGS
This converter stores all log files information in one big nested array in memory, before writing. Therefore, memory consumption is linear with the size of the log. SEE ALSO
mysql(1), mysqld(1) VERSION
$Id: mysql2dlf.in,v 1.12 2010/12/05 20:36:45 wraay Exp $ COPYRIGHT
Copyright (C) 2001, 2002 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. AUTHOR
Egon Willighagen <egonw@logreport.org> Lire 2.1.1 2011-12-31 MYSQL2DLF.IN(1)
All times are GMT -4. The time now is 09:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy