LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-24-2005, 09:14 PM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
wget html grabbing script


I have used wget -drc <url> in the past to grab online data for offline web reading. I want to do this with a rather large book with hundreds of links. The index page is HERE

There are hundred of translations online and using wget -drc <url> would produce a huge output. I need a script which will increment the following marked with an * so that wget could read it:

http://www.biblegateway.com/passage/?book_id=*&chapter=*&version=50

Any ideas?

Last edited by linuxhippy; 11-24-2005 at 09:15 PM.
 
Old 11-25-2005, 08:21 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,256

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Use seq, man seq for more infos
 
Old 11-25-2005, 03:14 PM   #3
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
thanks for the tip-does it work with wget in a command line??
 
Old 11-25-2005, 03:19 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,256

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
Yes in a loop like,
Code:
for i in $(seq 1 10); do
    for j in $(seq 1 10); do
        wget "http://www.biblegateway.com/passage/?book_id=$i&chapter=$j&version=50"
    done
done
Of course you need to ajust the sequence number
 
Old 11-25-2005, 06:17 PM   #5
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
Wow-nice! Thanks a lot!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML login script js_valencia Linux - Newbie 2 11-20-2005 04:45 PM
script for wget EmOuBi Linux - Software 11 08-02-2005 02:03 PM
a script that runs wget every 3 minutes Menestrel Programming 3 07-26-2005 12:22 PM
Simple bash script help, grabbing part of a string colabus Linux - Newbie 3 04-25-2005 10:42 AM
GNU wget return codes for shell script greenhornet Programming 3 05-09-2004 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration