blob: 594ef6a1d64bf64dfdae61e921766decd8fd70d4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
# $FreeBSD: releng/12.0/bin/sh/tests/builtins/read3.0 212330 2010-09-08 18:32:23Z jilles $
printf '%s\n' 'a\ b c' | { read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' 'a b\ c' | { read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' 'a\:b:c' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' 'a:b\:c' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' '\ a' | { read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' '\:a' | { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' '\\' | { read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' '\\\ a' | { read a b; printf '%s\n' "x${a}x${b}x"; }
printf '%s\n' '\\\ a' | { read -r a b; printf '%s\n' "x${a}x${b}x"; }
|