Eugene Grosbein
2018-10-22 12:08:58 UTC
Hi!
$ echo test | read line; echo $?
0
$ echo -n test | read line; echo $?
1
Is it right behavior for /bin/sh?
This makes it hard for "while read line ... < file"
to process last line if it is not followed by new line character.
Eugene
$ echo test | read line; echo $?
0
$ echo -n test | read line; echo $?
1
Is it right behavior for /bin/sh?
This makes it hard for "while read line ... < file"
to process last line if it is not followed by new line character.
Eugene