Hacker News new | ask | show | jobs
by pests 1057 days ago
Basically, bash executes the script line by line as it is downloading - pausing the download while that line executes. By sending a sleep() command early in the script you can detect the delay in the next line beind downloaded.

Its a lot more complicated due to TCP buffers and trying to hide output from the user.

Original article below. It is giving me a certificate error though but its available through archives or a cache.

https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...

3 comments

Neat article.

Cached version → http://archive.today/O46rw

"This Connection is Invalid. SSL certificate expired."
Yeah I mentioned that. You have to go through a cache or an archive.
Amazing, thanks.