News for hackers. Stuff that matters.
Re:Show HN: Tap curl in your editor before it gets to sh by robryk on Sunday November 13, 2016 @10:36AM (#12943802)
Why do you create an env variable that contains the whole file in question when the editor returned success? Wouldn't something like:

  cat "$f"; rm "$f"
not involve loading the whole file in memory at once? Note that using this also makes sense with self-extracting archives/shell scripts, because it lets you inspect the shell script at the beginning.
Re:Show HN: Tap curl in your editor before it gets to sh by 0xmohit on Sunday November 13, 2016 @12:24PM (#12944395)
Moreover, dumping the file into a variable doesn't seem to be a good idea if the file were to contain null characters.
Re:Show HN: Tap curl in your editor before it gets to sh by littlepootis on Sunday November 13, 2016 @12:41PM (#12944492)