OILS
/
spec
/
testdata
/
ysh-for-stdin.ysh
View on Github
|
oilshell.org
44 lines, 26 significant
1 |
|
2 | # I think <> is just stdin for now
|
3 | # Later we could add
|
4 | #
|
5 | # < >
|
6 | # < *.py README.md >
|
7 | # etc.
|
8 |
|
9 | seq 3 | for x in <> {
|
10 | echo "-$x-"
|
11 | }
|
12 | echo
|
13 |
|
14 |
|
15 | seq 3 | for i, x in <> {
|
16 | echo "$i $x"
|
17 | }
|
18 | echo
|
19 |
|
20 | echo 'empty'
|
21 |
|
22 | fopen < /dev/null {
|
23 | for x in <> {
|
24 | echo "$x"
|
25 | }
|
26 | }
|
27 |
|
28 | echo 'done'
|
29 | echo
|
30 |
|
31 | echo 'empty2'
|
32 |
|
33 | for x in <> {
|
34 | echo "$x"
|
35 | } < /dev/null
|
36 |
|
37 | echo 'done2'
|
38 | echo
|
39 |
|
40 | echo 'space'
|
41 |
|
42 | echo 'hi' | for x in < > {
|
43 | echo "$x"
|
44 | }
|