Skip to content

Comment on "So that a truncated partial download doesn't end up executing half a script"

Comments

The shell script starts with the following comment:

    # All the code is wrapped in a main function that gets called at the
    # bottom of the file, so that a truncated partial download doesn't end
    # up executing half a script.

Most of these scripts have been doing that for years.

I'm sure of it. And yet based on this rapidly getting to the front page, it seems like many of us are part of today's lucky ten thousand: https://xkcd.com/1053/

Might be more than ten thousand, even, based on the reactions :)

I had to do stuff like this over com ports using systems made before PC's.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.