LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Poll: Windows will be no more within upcomming 10 years..
Be advised that this is a public poll: other users can see the choice(s) you selected.
Poll Options
Windows will be no more within upcomming 10 years..

You must log in and have one post to vote in this poll. If you don't have an account, you can register here.
Results will be available after the polls close.

The nominees are:

Ofcourse ! I firmly belive this
Perhaps...
It can gain mre attention but Linux could never overtake Windows!!
NO, Its totally impossible !!

Reply
 
Search this Thread
Old 04-09-2010, 06:28 AM   #1
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Rep: Reputation: 18
Lightbulb How to make multiple threads of currently running shell script?


I am developing a project of simple download scheduler in Linux using the LYNX command line browser.
Basically this application will work in 4 steps AUTOMATICALLY (i.e. @ pre-specified time):
1) to connect to the internet
2) Go to download page, and login using the LYNX command line web browser.
3) Start download.
4) disconnect from web, save any uncomplete downloads , halt the computer.

All works smoothly. But what if I could make multiple threads of the script running "wget" command ??

Obviously my speed of downloading is going to be increased.

I am ready if I need to create individual script for all wget commands.

If this is not possible please give me suggestions that how can I create multiple instances of downloading process.
 
Old 04-09-2010, 06:40 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Your problem is not threading (it would be, but you are not even at that stage yet). Your problem here is that wget and lynx have no support, as far as I know, to do what you want. Both will take an URL and fetch it, but there's no way to tell wget to download only a portion of a given file (again, as far as I know), the same goes for lynx.

Why not just use something like axel?
 
Old 04-10-2010, 03:39 AM   #3
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
Yeah , but what is axel ? I don't knw about it at all..can yu give me a link 4 tht or some explaination please ?
 
Old 04-10-2010, 04:21 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,497

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Are you incapable of using web search ?.
I too read that post yesterday, and it took 2 minutes to find all sorts of info about axel - and other possible options.
 
Old 04-10-2010, 04:30 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,628

Rep: Reputation: Disabled
http://lmgtfy.com/?q=axel

The third link that comes up is your answer. If you want to increase the download speed for your download by splitting the files into different segments and downloading them simultaneously, you would need download accelerator of some kind. A browser will not do that.
 
1 members found this post helpful.
Old 04-17-2010, 06:12 AM   #6
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
Lightbulb Can curl do what I want ?

Dear all friends,
Can curl help me in which i'm interestred ??
 
Old 04-17-2010, 06:27 AM   #7
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
Post

@i92guboj,

First of all thanks for your suggestion.
axel is really good !!
Yeah i knw smthng by nt everything, so improper knowledge would pinch me.but as this download scheduler is my semester project . so i HAVE TO show some kind of coding in it.

Ri8 now i 've 2 ideas in my mind ...
1) sync command
AND ...
2) curl command.
Now can multithreading help me ??
 
Old 04-21-2010, 08:28 PM   #8
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
@ i92guboj :

by using the system("<command>"); i am able to call sys cmds from C.
now I want to make multipl threads of downloading so cURL or wget which is your suggestion ? another command is also welcomed..
 
Old 04-21-2010, 08:32 PM   #9
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
any one can help me...
 
Old 04-21-2010, 08:44 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Can you please spell your words out correctly? I find your posting
style rather irritating.
 
Old 04-21-2010, 08:51 PM   #11
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
@ Tinkster : for sure .
----------------------------

Please tell me the perfect pair from these >

to schedule : at, crontab .. ???
&
to download any particular file from given URL : wget, cURL ...

anyone, please...
 
  


Reply

Tags
multiple


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
Runs Multiple shell script inside a main script using crontab srimal Linux - Newbie 4 10-22-2009 07:19 PM
Shell script for multiple OS investmentbnker75 Programming 2 06-28-2009 05:37 PM
running a shell script which invokes another shell program!!! raghu123 Programming 1 08-04-2008 10:10 AM
Need to make multiple lines into one with no extra spacing with shell script. sunksullen Programming 10 05-10-2007 06:20 PM
Preventing multiple instances of a shell script from running concurrently Dave Lerner Programming 12 01-03-2007 10:27 PM


All times are GMT -5. The time now is 05:19 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration