How to make multiple threads of currently running shell script?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Windows will be no more within upcomming 10 years..
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.
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.
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.
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.
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 ??
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..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.