Date: Mon, 22 Oct 2018 19:08:58 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Freebsd hackers list <freebsd-hackers@freebsd.org> Subject: shell read built-in Message-ID: <2fff355e-a729-d5d3-8199-f2bbba80c112@grosbein.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2fff355e-a729-d5d3-8199-f2bbba80c112>