[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wget input/output using stdin/stdout
From: |
Darshit Shah |
Subject: |
Re: wget input/output using stdin/stdout |
Date: |
Sat, 02 Mar 2024 13:06:31 +0530 |
User-agent: |
Cyrus-JMAP/3.11.0-alpha0-205-g4dbcac4545-fm-20240301.001-g4dbcac45 |
Hi Dan,
For this usecase, I would highly recommmend using the successor to GNU Wget,
GNU Wget2. It is not available in most distribution repositories. See
https://gitlab.com/gnuwget/wget2
Wget2 supports reading from stdin throughout the life of the program.
On Sat, Mar 2, 2024, at 09:35, Dan Lewis via Primary discussion list for GNU
Wget wrote:
> Greetings,
>
> I have a program that loads and executes wget using the following command
> line:
>
> wget -i - -O -
>
>
> and dups wget's stdin, stdout (and stderr) handles so that I can write URLs
> to wget's stdin and read the responses from wget's stdout. What I wanted to
> do was to write a sequence of URLs to wget's stdin, reading each response
> before the next URL is sent. Rather, wget buffers its output so that it
> doesn't output anything until I close its stdin. As a result, it seems that I
> can only send all of the URLs to wget, close its stdin, and then read all
> of the responses.
>
> Is there any wget command line option that will cause wget to output a
> response after each URL without waiting for me to close its stdin?
>
> Thanks!
> Dan