Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: wget in script ?


  • Subject: Re: lug-bg: wget in script ?
  • From: zimage@xxxxxxxxx (zimage@xxxxxxxxx)
  • Date: Thu, 13 Jun 2002 01:04:45 +0300



On Wed, Jun 12, 2002 at 09:53:00PM +0300, Ice wrote:
> >  Ïðîñòî blind guess - íå òè ëè âúðøè ðàáîòà ñëåäíîòî:
> >  wget -Q10m -i stream.list
> >  êàòî â stream.list èìàø åäèí àäðåñ(âúïðîñíèÿ ñòðèéì ôàéë)
> >  è îãðàíè÷åíèåòî òè å 10ìåãà, â ñëó÷àÿ
> >  Àêî ïóñíåø wget ñ êâîòà, íî áåç âõîäÿù ôàéë, íÿìà äà ñòàíå.
> >
> 
> Za syjalenie i taka ne stava :(
> 
> ice@ice:~$ wget -Q50k -i stream.list
> --21:45:06--  http://192.168.168.33:8090/audio1.mp3
>            => `audio1.mp3'
> Connecting to 192.168.168.33:8090... connected!
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [audio/x-mpeg]
> 
>     0K .......... .......... .......... .......... .......... @   1.43 KB/s
>    50K .......... .......... .......... .......... .......... @   2.10 KB/s
>   100K .......... .......... .......... .......... i t.n. i t.n.

Eto ti edin dosta grubianski metod ;-)

---> cut <---

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main(){
pid_t pid;

pid = fork();

if(pid == 0){
        printf("Spawning wget...\n");
        if( execl("/usr/bin/wget", "wget", "ftp://ftp.del.bg/pub/Linux/find.gz";, NULL) == -1 )
                printf("Can not fork for wget.\n");
        } else {
                printf("Sleeping for 10
                seconds\n");
                sleep(10);
                printf("\nTerminating
                child pid %u\n", pid);
                kill(pid, SIGTERM);
        }
        return 0;
}

--->cut<---

Ako se dobaviat oshte malko proverki i putia + argumentite se vzemat ot
command line shte stane pochti prilichno ;-)


-- 
        Theodor Milkov           Administrator IP Networks
        Davidov Electric Ltd.    Phone: +359 (2) 730158
        PGP: http://www.zimage.delbg.com/zimage.asc
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================




 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.