freebsd-nq/bin/sh/tests/builtins/read9.0
Jilles Tjoelker f0688a48d2 sh: Fix read with escaped IFS characters at the end.
Characters escaped with a backslash must be treated as if they were not in
IFS. This includes stripping trailing IFS characters.
2015-08-30 17:24:22 +00:00

11 lines
139 B
Plaintext

# $FreeBSD$
empty=''
read a b c <<EOF
\ \ A B\ \ B C\ \ $empty
EOF
read d e <<EOF
D\ $empty
EOF
[ "$a.$b.$c.$d.$e" = " A.B B.C .D ." ]