xref: /freebsd/bin/sh/tests/builtins/read3.0 (revision b9f654b163bce26de79705e77b872427c9f2afa1)
1# $FreeBSD$
2
3printf '%s\n' 'a\ b c'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
4printf '%s\n' 'a b\ c'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
5printf '%s\n' 'a\:b:c'	| { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
6printf '%s\n' 'a:b\:c'	| { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
7printf '%s\n' '\ a'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
8printf '%s\n' '\:a'	| { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
9printf '%s\n' '\\'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
10printf '%s\n' '\\\ a'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
11printf '%s\n' '\\\ a'	| { read -r a b; printf '%s\n' "x${a}x${b}x"; }
12