P
P
Pavel Padozhnikov2015-08-23 08:09:24
linux
Pavel Padozhnikov, 2015-08-23 08:09:24

How to implement a program for downloading from given links?

In order to download, in linux, you can enter wget http://@#*!!! and you will have the required file. But how to write this in a simple, not intricate program?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AtomKrieg, 2015-08-24
@PaveL152

#include <stdlib.h>

int main()
{
  system("wget http://@#*!!!");
  return 0;
}

A
Alexander Taratin, 2015-08-23
@Taraflex

curl.haxx.se/libcurl

Z
zelsky, 2015-08-23
@zelsky

My answer as a python coder.

import os
import sys
f = open('workfile', 'w')
for line in f:
        os.system('wget %s' % (line))

Well, or on the tower. (I'm not sure if it works)
#!/bin/bash
for i in `cat links.txt `
do
wget "$i"
done
exit 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question