projects
/
dragonfly.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Upgrade openssh. 1/2
[dragonfly.git]
/
tools
/
regression
/
bin
/
sh
/
builtins
/
read2.0
1
# $FreeBSD: head/tools/regression/bin/sh/builtins/read2.0 212187 2010-09-03 21:17:33Z jilles $
2
3
set -e
4
{
5
echo 1
6
echo two
7
echo three
8
} | {
9
read x
10
[ "$x" = 1 ]
11
(read x
12
[ "$x" = two ])
13
read x
14
[ "$x" = three ]
15
}
16
17
T=`mktemp sh-test.XXXXXX`
18
trap 'rm -f "$T"' 0
19
{
20
echo 1
21
echo two
22
echo three
23
} >$T
24
{
25
read x
26
[ "$x" = 1 ]
27
(read x
28
[ "$x" = two ])
29
read x
30
[ "$x" = three ]
31
} <$T