On Solaris 11 running Bash 4.4.19 (the standard install?) there appears to be a 256 character limit of sorts on the input line. I'd like to understand where this limit is coming from.
I've skimmed the man page, but I don't find anything which addresses this. This happens only when the readline library is not in use. In the lines below, the length of echo 678[...]23456
is 256 characters
sfmg10 0 5:37pm> uname -a
SunOS sfmg10 5.11 11.4.6.4.0 sun4v sparc sun4v
sfmg10 0 5:37pm> /usr/bin/bash --version
GNU bash, version 4.4.19(1)-release (sparc-sun-solaris2.11)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
sfmg10 0 5:38pm> /usr/bin/bash -norc -noprofile
bash-4.4$ set -o emacs
bash-4.4$ echo 6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
bash-4.4$ set +o emacs
bash-4.4$ echo 67890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
67890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
bash-4.4$ echo 678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
bash-4.4$ echo 6789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
bash: 8: command not found
The first line with an echo is 258 characters and executes as expected.
The second echo line is 256 characters executes as expected.
The third echo line is 257 characters and produces no output.
The fourth echo line is 258 characters and bash appears to throw out the first 257 characters and then execute the remaining characters.
I've tried this on several Linux, Mac OSX, and FreeBSD systems and could not reproduce the odd behavior.
On Solaris 9 with bash 2.05.0(1)-release and Solaris 10 with bash 3.2.57(1)-release (the same version as one of the Mac OSX boxes I get the same odd behavior as Solaris 11. I had thought that Solaris 10 was slightly different, but that was because I was accessing it through putty instead of an xterm. The putty/xterm difference is described in my comment below.
Why does bash throw out the first 257 characters of lines 257 characters or longer? Is this a bug or a feature? Is this caused by bash, Solaris, or something else? Can I change this number without re-compiling bash?