summaryrefslogtreecommitdiff
path: root/tests/read1.sub
blob: 2a36449b8b9a8d4cfe80c36bbfc73dd7a122e072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
a=7
echo 'abcdefg|xyz' | {
	read -d '|' a 
	echo a = "${a-unset}"
}

echo xyz 123 | {
	read -d ' ' a
	echo a = "${a-unset}"
}

echo xyz 123 | {
	read -d $'\n' a
	echo a = -"${a-unset}"-
}

a=44
echo abcd | {
	read -d d a
	echo a = $a
}

exit 0