[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How many chars read -r line can read from tty?
From: |
Peng Yu |
Subject: |
How many chars read -r line can read from tty? |
Date: |
Wed, 15 May 2024 15:47:20 -0500 |
Hi,
read -r line; echo ${#line}
The above code does not work when the input is long. I tried to paste
to the terminal a string of 1024 characters. When I type return, I
just hear beeping. read won't finish so that the length of $line can
be printed.
If I try a string with length 1023, it will finish correctly and print 1023.
Anybody know why there is such a limit?
--
Regards,
Peng
- How many chars read -r line can read from tty?,
Peng Yu <=