They always say computers are so good with numbers, but you canโ€™t even store 2000 numbers in a single file!!

Try it out for yourself:

seq 1 2000 | tr '\n' ' '
cat > /tmp/wat.txt
<copy&paste the 2000 numbers from above, press enter, then ctrl+d to end input>
cat /tmp/wat.txt
wc /tmp/wat.txt

Or see my screencast here: https://asciinema.org/a/fLhMt640MqFWGuug

On a Mac, I can save even fewer numbers! But at least I get feedback that the line is full. How many numbers can your computer save?

How to read over 4k input without new lines on a terminal?

So I have a lot of data WITHOUT NEW LINES on the clipboard (it's a large SVG file on one line). I went $ cat >file.svg then tried to paste (in Gnome Terminal), but only the first 4kB characters...

Unix & Linux Stack Exchange
stdio workaround for tty buffer line limit.

stdio workaround for tty buffer line limit. GitHub Gist: instantly share code, notes, and snippets.

Gist