I have the following shell script to read lines from terminal
#!/bin/bash
while read line
do
if [ -z ${line} ]
then
break
fi
echo ${line}
done
I cannot enter more than 256 characters. The terminal doesn't allow me to do so (Terminal doesn't print anything beyond 256 characters, not even new line. only thing it allows is backspace)
$ ./echo.sh
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Im using solaris 10 OS terminal used is putty bash version 3.2.52
Is this a limitation in bash, or putty? I know to break my input into several lines, but I need to know if there is way to overcome maximum number of characters entered for read command as input