terminal input buffer size
Hello,
In terminal I run a command that waits for a user input, for example `base64`. I paste the text, but I can only paste up to 1024 symbols. Where is this limit set and how I can increase it?
Thanks.
Hello,
In terminal I run a command that waits for a user input, for example `base64`. I paste the text, but I can only paste up to 1024 symbols. Where is this limit set and how I can increase it?
Thanks.
@etresoft
I think it's the issue with the terminal. It beeps a couple of times when I paste a big chunk of data.
I can run
base64 <<<"very long text goes here"
fine. It supplies the line on the standard input to the base64 command.
The issue happens when I paste.
@etresoft
I think it's the issue with the terminal. It beeps a couple of times when I paste a big chunk of data.
I can run
base64 <<<"very long text goes here"
fine. It supplies the line on the standard input to the base64 command.
The issue happens when I paste.
It's probably a problem with that command. Tools that expect user input typically don't expect an unlimited stream of data. 1024 is a reasonable limit in such cases.
See if the tool has an option to read data from standard input. Then, you can use the "pbpaste" command with a pipe to feed the contents of your clipboard as standard input.
gasan48 wrote:
The issue happens when I paste.
So don't paste. Do this instead:
pbpaste | base64
The back tics are old school. Once you have text on the clipboard, you might consider something like this to send the text on the clipboard into base64:
base64 <<<$(pbpaste) > output.txt.b64
gasan48 wrote:
Hello,
In terminal I run a command that waits for a user input, for example `base64`. I paste the text, but I can only paste up to 1024 symbols. Where is this limit set and how I can increase it?
Thanks.
Not sure I get it...
if this is scroll back limit you can change that is Settings...
Limit the number of scrollback rows in Terminal on Mac - Apple Support
I do see quite a bit of base64 Q&A:
https://www.google.com/search?client=firefox-b-1-d&q=apple+kb+base64+buffer+size+in+terminal
Just use the example I provided. Simpler to deal with and does not bump up against potential Terminal command-line length issues.
Anything that you paste from the clipboard using ^v must be deliberately enclosed in double quotes when using the <<< input operator — but why deal with the horrible mess that creates in the Terminal window?
gasan48 wrote:
@etresoft
actually, the issue happens also when I type the text.
I run
base64
and then type text, at 1024 symbols terminal starts beeping and does not accept any more input.
Yeah. I got that. You'll need to find another solution. You've been offered a couple of similar solutions. It's on you to pick one of them.
gasan48 wrote:
I am curious where the terminal input buffer limit is set and how I can change it.
That's what I told you in my first reply. No such thing exists. By logical deduction, you can't change the behaviour of what doesn't exist.
I run
base64
in terminal and then paste the input.
I typed backticks in my question to format the command name as code, which didn't happen.
@etresoft
actually, the issue happens also when I type the text.
I run
base64
and then type text, at 1024 symbols terminal starts beeping and does not accept any more input.
@etresoft
I am curious where the terminal input buffer limit is set and how I can change it. Thanks for pbpaste suggestion.
terminal input buffer size