# read-p.sh: test of the read built-in for any POSIX-compliant shell posix="true" setup -d test_oE 'single operand - without IFS' read a <<\END A END echoraw $? "[${a-unset}]" __IN__ 0 [A] __OUT__ test_oE 'single operand - with IFS whitespace' read a <<\END A END echoraw $? "[${a-unset}]" __IN__ 0 [A] __OUT__ test_oE 'single operand - with IFS non-whitespace' read a <<\END - A - END echoraw $? "[${a-unset}]" __IN__ 0 [- A -] __OUT__ test_oE 'EOF fails read' ! read a