3 ms·
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
by robryk 10y ago
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.
- 0xmohit 10y agoMoreover, dumping the file into a variable doesn't seem to be a good idea if the file were to contain null characters.
- littlepootis 10y agofixed in https://github.com/awalGarg/curl-tap-sh/commit/ab4e079468a2b66093ebe6d70bd8b175affbfc78 https://github.com/awalGarg/curl-tap-sh/commit/ab4e079468a2b..., thanks