read
is a shell utility used for reading strings from the standard input stream, or from a file descriptor.
Questions tagged [read]
365 questions
5
votes
1 answer
shell read incorrectly processes enter keypress
I'm working on a relatively new Linux Mint installation and I haven't noticed any significant issues until just now, I realised I couldn't use any command-line tools that interactively read user input. Instead of processing an enter key as I'd…

Zoey Hewll
- 474
2
votes
1 answer
Is read -r only used in rare exceptional usecases of read?
According to this manual -r for read:
Do not allow backslashes to escape any characters
I understand that generally, the read shell builtin gets input and creates a variable which holds that input as a string in which backslashes would be just…

variableexpander
- 125
1
vote
1 answer
Splitting a null separated string
Hereafter are two read statements, one that uses a space as a delimiter, and the other \0. Only the first works. What am I doing wrong with the second?
$ IFS=' '; read first second < <(printf "%s " "x" "y" ); echo "$first+$second"
x+y
$…

Erwann
- 677
0
votes
2 answers
how does read(3) handle when nbyte < 0?
I couldn't find any behavior defined in the man page for read(3). My guess would be that it either throws an error or it just returns 0. But if someone could confirm any defined behavior that would be great. Or if the behavior is specified as being…

Justin
- 1