OILS / spec / testdata / ysh-read-0.sh View on Github | oilshell.org

35 lines, 27 significant
1
2echo 'read -r'
3seq 2 | {
4 read -r
5 echo REPLY=$REPLY
6
7 read -r
8 echo REPLY=$REPLY
9}
10echo
11
12echo 'read --line'
13seq 2 | {
14 read --line
15 echo _reply=$_reply
16
17 read --line
18 echo _reply=$_reply
19}
20echo
21
22echo 'Mixed'
23seq 4 | {
24 read -r
25 echo REPLY=$REPLY
26
27 read -r
28 echo REPLY=$REPLY
29
30 read --line
31 echo _reply=$_reply
32
33 read -r
34 echo REPLY=$REPLY
35}